1 /*
2 * $Id$
3 *
4 * Created on 26 Jan 2010 by Paul Harrison (paul.harrison@manchester.ac.uk)
5 *
6 * Adapted from official SOFA C implementation http://www.iausofa.org/
7 */
8
9 package org.jastronomy.jsofa;
10
11 import static java.lang.Math.cos;
12 import static java.lang.Math.sin;
13 import static java.lang.Math.atan;
14 import static java.lang.Math.atan2;
15 import static java.lang.Math.min;
16 import static java.lang.Math.max;
17 import static java.lang.Math.ceil;
18 import static java.lang.Math.floor;
19 import static java.lang.Math.sqrt;
20 import static java.lang.Math.abs;
21 import static java.lang.Math.pow;
22
23
24
25
26
27
28
29
30 /**
31 * Java implementation of Standards of Fundamental Astronomy. <a href="http://www.iausofa.org/">http://www.iausofa.org/</a>
32 *
33 * This code has been created by hand translating the official C version.
34 *
35 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 02 Apr 2014
36 * @version JSOFA Release 20180130
37 * @since 26 Jan 2010
38 */
39 public class JSOFA {
40 /** tracked IAU SOFA release {@value}. */
41 public final static String SOFA_RELEASE = "2020-07-21";
42
43 /** JSOFA release {@value}*/
44 public final static String JSOFA_RELEASE = "20200721";
45
46 /** tracked IAU SOFA revision {@value}. */
47 public final static String SOFA_REVISION = "16";
48
49 /** Release year for this version of jauDat {@value} */
50 public final static int IYV = 2020;
51 /** The latest confirmed omission of a leap second form IERS */
52 public final static JulianDate latestConfirmedNoLeapSecondChange;
53 static {
54 JulianDate tmpval = new JulianDate(0,0);
55 try {
56 tmpval = jauCal2jd(2020,12,31); // this is from the IERS
57 } catch (JSOFAIllegalParameter e) {
58 // should not happen
59 e.printStackTrace();
60 }
61 latestConfirmedNoLeapSecondChange = tmpval;
62 }
63 static class LeapInfo {
64 final public int iyear, month;
65 final public double delat;
66 public LeapInfo(int i, int m, double t) {
67 iyear = i;
68 month = m;
69 delat = t;
70 }
71 }
72
73 /* Dates and Delta(AT)s */
74 static final LeapInfo leapSeconds[] = {
75 new LeapInfo( 1960, 1, 1.4178180 ),
76 new LeapInfo( 1961, 1, 1.4228180 ),
77 new LeapInfo( 1961, 8, 1.3728180 ),
78 new LeapInfo( 1962, 1, 1.8458580 ),
79 new LeapInfo( 1963, 11, 1.9458580 ),
80 new LeapInfo( 1964, 1, 3.2401300 ),
81 new LeapInfo( 1964, 4, 3.3401300 ),
82 new LeapInfo( 1964, 9, 3.4401300 ),
83 new LeapInfo( 1965, 1, 3.5401300 ),
84 new LeapInfo( 1965, 3, 3.6401300 ),
85 new LeapInfo( 1965, 7, 3.7401300 ),
86 new LeapInfo( 1965, 9, 3.8401300 ),
87 new LeapInfo( 1966, 1, 4.3131700 ),
88 new LeapInfo( 1968, 2, 4.2131700 ),
89 new LeapInfo( 1972, 1, 10.0 ),
90 new LeapInfo( 1972, 7, 11.0 ),
91 new LeapInfo( 1973, 1, 12.0 ),
92 new LeapInfo( 1974, 1, 13.0 ),
93 new LeapInfo( 1975, 1, 14.0 ),
94 new LeapInfo( 1976, 1, 15.0 ),
95 new LeapInfo( 1977, 1, 16.0 ),
96 new LeapInfo( 1978, 1, 17.0 ),
97 new LeapInfo( 1979, 1, 18.0 ),
98 new LeapInfo( 1980, 1, 19.0 ),
99 new LeapInfo( 1981, 7, 20.0 ),
100 new LeapInfo( 1982, 7, 21.0 ),
101 new LeapInfo( 1983, 7, 22.0 ),
102 new LeapInfo( 1985, 7, 23.0 ),
103 new LeapInfo( 1988, 1, 24.0 ),
104 new LeapInfo( 1990, 1, 25.0 ),
105 new LeapInfo( 1991, 1, 26.0 ),
106 new LeapInfo( 1992, 7, 27.0 ),
107 new LeapInfo( 1993, 7, 28.0 ),
108 new LeapInfo( 1994, 7, 29.0 ),
109 new LeapInfo( 1996, 1, 30.0 ),
110 new LeapInfo( 1997, 7, 31.0 ),
111 new LeapInfo( 1999, 1, 32.0 ),
112 new LeapInfo( 2006, 1, 33.0 ),
113 new LeapInfo( 2009, 1, 34.0 ),
114 new LeapInfo( 2012, 7, 35.0 ),
115 new LeapInfo( 2015, 7, 36.0 ),
116 new LeapInfo( 2017, 1, 37.0 )
117 };
118
119
120 /** Seconds of time to radians {@value} */
121 public final static double DS2R = (7.272205216643039903848712e-5);
122
123 /** Pi {@value}*/
124 public final static double DPI = (3.141592653589793238462643);
125
126 /** 2Pi {@value}*/
127 public final static double D2PI = (6.283185307179586476925287);
128
129 /** Radians to degrees {@value} */
130 public final static double DR2D = (57.29577951308232087679815);
131
132 /** Degrees to radians {@value}*/
133 public final static double DD2R = (1.745329251994329576923691e-2);
134
135 /** Radians to arcseconds {@value}*/
136 public final static double DR2AS = (206264.8062470963551564734);
137
138 /** Arcseconds to radians {@value}*/
139 public final static double DAS2R = (4.848136811095359935899141e-6);
140
141 /** Arcseconds in a full circle {@value}*/
142 public final static double TURNAS = (1296000.0);
143
144 /** Milliarcseconds to radians {@value}*/
145 public final static double DMAS2R = (DAS2R / 1e3);
146
147 /** Length of tropical year B1900 (days) {@value}*/
148 public final static double DTY = (365.242198781);
149
150 /** Reference epoch (J2000.0), Julian Date {@value}*/
151 public final static double DJ00 = (2451545.0);
152
153 /** Julian Date of Modified Julian Date zero {@value}*/
154 public final static double DJM0 = (2400000.5);
155
156 /** Reference epoch (J2000.0), Modified Julian Date {@value} */
157 public final static double DJM00 = (51544.5);
158
159 /** Seconds per day. {@value}*/
160 public final static double DAYSEC = (86400.0);
161
162 /** Days per Julian year */
163 public final static double DJY = (365.25);
164
165 /** Days per Julian century {@value} */
166 public final static double DJC = (36525.0);
167
168 /** Days per Julian millennium {@value} */
169 public final static double DJM = (365250.0);
170
171 /** 1977 Jan 1.0 as MJD */
172 public final static double DJM77 = (43144.0);
173
174 /** TT minus TAI (s) */
175 public final static double TTMTAI = (32.184);
176
177
178 /** Astronomical unit (m) IAU 2012 {@value} */
179 public final static double DAU = (149597870.7e3);
180
181 /** Speed of light (m/s) {@value} */
182 public final static double CMPS = 299792458.0;
183
184 /** Light time for 1 au (s) {@value} */
185 public final static double AULT = (DAU/CMPS);
186
187
188 /** Speed of light (au per day) {@value} */
189 public final static double DC = (DAYSEC / AULT);
190
191 /** L_G = 1 - d(TT)/d(TCG) */
192 public final static double ELG = (6.969290134e-10);
193
194 /** L_B = 1 - d(TDB)/d(TCB) at TAI 1977/1/1.0 */
195 public final static double ELB = (1.550519768e-8);
196
197 /** Schwarzschild radius of the Sun (au) {@value}
198 = 2 * 1.32712440041e20 / (2.99792458e8)^2 / 1.49597870700e11 */
199 public final static double SRS = 1.97412574336e-8;
200
201
202 /** TDB (s) at TAI 1977/1/1.0 */
203 public final static double TDB0 = (-6.55e-5);
204
205 private final static double TANGENT_TINY = 1e-6;
206
207 private static final double DBL_EPSILON = Math.ulp(1.0);
208
209 /** dint(A) - truncate to nearest whole number towards zero (double) */
210 private static double dint(final double A){ return ((A)<0.0?ceil(A):floor(A));}
211
212 /** dnint(A) - round to nearest whole number (double) */
213 private static double dnint(final double A){return (abs(A)<0.5?0.0
214 :((A)<0.0?ceil((A)-0.5):floor((A)+0.5)));}
215
216 /** dsign(A,B) - magnitude of A with sign of B (double) */
217 private static double dsign(final double A, double B){return ((B)<0.0?-abs(A):abs(A));}
218
219
220
221 /**
222 * Julian Date representation. The actual date is djm0+djm1, apportioned in any
223 * convenient way between the two arguments. For example,
224 * JD(TT)=2450123.7 could be expressed in any of these ways,
225 * among others:
226 *<pre>
227 * djm0 djm1
228 *
229 * 2450123.7 0.0 (JD method)
230 * 2451545.0 -1421.3 (J2000 method)
231 * 2400000.5 50123.2 (MJD method)
232 * 2450123.5 0.2 (date &time method)
233 *</pre>
234 *
235 * The JD method is the most natural and convenient to use in
236 * cases where the loss of several decimal digits of resolution
237 * is acceptable. The J2000 method is best matched to the way
238 * the argument is handled internally and will deliver the
239 * optimum resolution. The MJD method and the date &time methods
240 * are both good compromises between resolution and convenience.
241 *
242 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 28 Jan 2010
243 *
244 *
245 */
246 public static class JulianDate implements Comparable<JulianDate>{
247 /** MJD zero-point */
248 public double djm0;
249 /** MJD offset */
250 public double djm1;
251 public JulianDate(double d1, double d2) {
252 djm0 = d1;
253 djm1 = d2;
254 }
255 /**
256 * {@inheritDoc}
257 * overrides @see java.lang.Comparable#compareTo(java.lang.Object)
258 */
259 @Override
260 public int compareTo(JulianDate o) {
261 if(this == o) return 0;
262 final Double thismjd = this.djm0 + this.djm1;
263 final Double thatmjd = o.djm0 + o.djm1;
264
265 return thismjd.compareTo(thatmjd);
266 }
267 /**
268 * {@inheritDoc}
269 * overrides @see java.lang.Object#hashCode()
270 */
271 @Override
272 public int hashCode() {
273 final int prime = 31;
274 int result = 1;
275 long temp;
276 temp = Double.doubleToLongBits(djm0);
277 result = prime * result + (int) (temp ^ (temp >>> 32));
278 temp = Double.doubleToLongBits(djm1);
279 result = prime * result + (int) (temp ^ (temp >>> 32));
280 return result;
281 }
282 /**
283 * {@inheritDoc}
284 * overrides @see java.lang.Object#equals(java.lang.Object)
285 */
286 @Override
287 public boolean equals(Object obj) {
288 if (this == obj)
289 return true;
290 if (obj == null)
291 return false;
292 if (!(obj instanceof JulianDate))
293 return false;
294 JulianDate other = (JulianDate) obj;
295 if (Double.doubleToLongBits(djm0) != Double
296 .doubleToLongBits(other.djm0))
297 return false;
298 if (Double.doubleToLongBits(djm1) != Double
299 .doubleToLongBits(other.djm1))
300 return false;
301 return true;
302 }
303 /**
304 * {@inheritDoc}
305 * overrides @see java.lang.Object#toString()
306 */
307 @Override
308 public String toString() {
309 return "MJD=" +Double.toString(djm0 + djm1 - DJM0);
310 }
311 }
312
313 /**
314 * Decompose radians into degrees, arcminutes, arcseconds, fraction.
315 *
316 *
317 * <p>This function is derived from the International Astronomical Union's
318 * SOFA (Standards Of Fundamental Astronomy) software collection.
319 *
320 * <p>Status: vector/matrix support function.
321 *
322 *
323 *
324 *<p>Called:<ul>
325 * <li>{@link #jauD2tf} decompose days to hms
326 *</ul>
327 * <p>Notes:
328 *<ol>
329 * <li> The argument ndp is interpreted as follows:
330 *
331 * <pre>
332 * ndp resolution
333 * : ...0000 00 00
334 * -7 1000 00 00
335 * -6 100 00 00
336 * -5 10 00 00
337 * -4 1 00 00
338 * -3 0 10 00
339 * -2 0 01 00
340 * -1 0 00 10
341 * 0 0 00 01
342 * 1 0 00 00.1
343 * 2 0 00 00.01
344 * 3 0 00 00.001
345 * : 0 00 00.000...
346 *</pre>
347 * <li> The largest positive useful value for ndp is determined by the
348 * size of angle, the format of doubles on the target platform, and
349 * the risk of overflowing idmsf[3]. On a typical platform, for
350 * angle up to 2pi, the available floating-point precision might
351 * correspond to ndp=12. However, the practical limit is typically
352 * ndp=9, set by the capacity of a 32-bit int, or ndp=4 if int is
353 * only 16 bits.
354 *
355 * <li> The absolute value of angle may exceed 2pi. In cases where it
356 * does not, it is up to the caller to test for and handle the
357 * case where angle is very nearly 2pi and rounds up to 360 degrees,
358 * by testing for idmsf[0]=360 and setting idmsf[0-3] to zero.
359 *</ol>
360 *@version 2008 May 27
361 *
362 * @since Release 20101201
363 *
364 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
365 * <!-- Given: -->
366 * @param ndp int resolution (Note 1)
367 * @param angle double angle in radians
368 * @param idmsf int[4] <u>returned</u> degrees, arcminutes, arcseconds, fraction
369 * <!-- Returned: -->
370 * @return sign char '+' or '-'
371 */
372 public static char jauA2af(final int ndp, final double angle, int idmsf[] ){
373 /* Hours to degrees * radians to turns */
374 final double F = 15.0 / D2PI;
375
376
377 /* Scale then use days to h,m,s function. */
378 char retval = jauD2tf(ndp, angle*F, idmsf);
379
380 return retval;
381
382
383 }
384
385
386
387 /**
388 * Decompose radians into hours, minutes, seconds, fraction.
389 *
390 *<p>This function is derived from the International Astronomical Union's
391 * SOFA (Standards Of Fundamental Astronomy) software collection.
392 *
393 *<p>Status: vector/matrix support function.
394 *
395 *<!-- Given: -->
396 * @param ndp int resolution (Note 1)
397 * @param angle double angle in radians
398 *
399 *<!-- Returned: -->
400 * @param ihmsf int[4] <u>returned</u> hours, minutes, seconds, fraction
401 * @return sign char <u>returned</u> '+' or '-'
402 *
403 *<p>Called:<ul>
404 * <li>{@link #jauD2tf} decompose days to hms
405 * </ul>
406 * <p>Notes:
407 * <ol>
408 *
409 * <li> The argument ndp is interpreted as follows:
410 * <pre>
411 * ndp resolution
412 * : ...0000 00 00
413 * -7 1000 00 00
414 * -6 100 00 00
415 * -5 10 00 00
416 * -4 1 00 00
417 * -3 0 10 00
418 * -2 0 01 00
419 * -1 0 00 10
420 * 0 0 00 01
421 * 1 0 00 00.1
422 * 2 0 00 00.01
423 * 3 0 00 00.001
424 * : 0 00 00.000...
425 *</pre>
426 * <li> The largest positive useful value for ndp is determined by the
427 * size of angle, the format of doubles on the target platform, and
428 * the risk of overflowing ihmsf[3]. On a typical platform, for
429 * angle up to 2pi, the available floating-point precision might
430 * correspond to ndp=12. However, the practical limit is typically
431 * ndp=9, set by the capacity of a 32-bit int, or ndp=4 if int is
432 * only 16 bits.
433 *
434 * <li> The absolute value of angle may exceed 2pi. In cases where it
435 * does not, it is up to the caller to test for and handle the
436 * case where angle is very nearly 2pi and rounds up to 24 hours,
437 * by testing for ihmsf[0]=24 and setting ihmsf(0-3) to zero.
438 *</ol>
439 * @version 2008 May 11
440 *
441 * @since Release 20101201
442 *
443 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
444 */
445 public static char jauA2tf(final int ndp, final double angle, int ihmsf[])
446 {
447 /* Scale then use days to h,m,s function. */
448 return jauD2tf(ndp, angle/D2PI, ihmsf);
449
450 }
451
452
453 /**
454 * Normalize angle into the range {@code 0 <= a < 2pi}.
455 *
456 *<p>This function is derived from the International Astronomical Union's
457 * SOFA (Standards Of Fundamental Astronomy) software collection.
458 *
459 *<p>Status: vector/matrix support function.
460 *
461 *<!-- Given: -->
462 * @param a double angle (radians)
463 *
464 * <!-- Returned (function value): -->
465 * @return double angle in range 0-2pi
466 *
467 *@version 2008 May 16
468 *
469 * @since Release 20101201
470 *
471 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
472 */
473 public static double jauAnp(final double a)
474 {
475 double w;
476
477
478 w = fmod(a, D2PI);
479 if (w < 0) w += D2PI;
480
481 return w;
482
483 }
484
485
486 /**
487 * Normalize angle into the range {@code -pi <= a < +pi}.
488 *
489 *<p>This function is derived from the International Astronomical Union's
490 * SOFA (Standards Of Fundamental Astronomy) software collection.
491 *
492 *<p>Status: vector/matrix support function.
493 *
494 *<!-- Given: -->
495 * @param a double angle (radians)
496 *
497 * <!-- Returned (function value): -->
498 * @return double angle in range +/-pi
499 *
500 *@version 2008 May 16
501 *
502 * @since Release 20101201
503 *
504 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
505 */
506 public static double jauAnpm(final double a)
507 {
508 double w;
509
510
511 w = fmod(a, D2PI);
512 if (abs(w) >= DPI) w -= dsign(D2PI, a);
513
514 return w;
515
516 }
517 /**
518 * Frame bias components of IAU 2000 precession-nutation models.
519 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 2 Feb 2010
520 *
521 * @since AIDA Stage 1
522 */
523 public static class FrameBias {
524 /** longitude corrections */
525 public double dpsibi;
526 /**obliquity corrections */
527 public double depsbi;
528 /** the ICRS RA of the J2000.0 mean equinox */
529 public double dra;
530 };
531
532 /**
533 * Frame bias components of IAU 2000 precession-nutation models (part
534 * of MHB2000 with additions).
535 *
536 *<p>This function is derived from the International Astronomical Union's
537 * SOFA (Standards Of Fundamental Astronomy) software collection.
538 *
539 *<p>Status: canonical model.
540 *
541 *<!-- Returned: -->
542 * @return dpsibi,depsbi double <u>returned</u> longitude and obliquity corrections
543 * dra double <u>returned</u> the ICRS RA of the J2000.0 mean equinox
544 *
545 * <p>Notes:
546 * <ol>
547 *
548 * <li> The frame bias corrections in longitude and obliquity (radians)
549 * are required in order to correct for the offset between the GCRS
550 * pole and the mean J2000.0 pole. They define, with respect to the
551 * GCRS frame, a J2000.0 mean pole that is consistent with the rest
552 * of the IAU 2000A precession-nutation model.
553 *
554 * <li> In addition to the displacement of the pole, the complete
555 * description of the frame bias requires also an offset in right
556 * ascension. This is not part of the IAU 2000A model, and is from
557 * Chapront et al. (2002). It is returned in radians.
558 *
559 * <li> This is a supplemented implementation of one aspect of the IAU
560 * 2000A nutation model, formally adopted by the IAU General
561 * Assembly in 2000, namely MHB2000 (Mathews et al. 2002).
562 *</ol>
563 *<p>References:
564 *
565 * Chapront, J., Chapront-Touze, M. &Francou, G., Astron.
566 * Astrophys., 387, 700, 2002.
567 *
568 * <p>Mathews, P.M., Herring, T.A., Buffet, B.A., "Modeling of nutation
569 * and precession New nutation series for nonrigid Earth and
570 * insights into the Earth's interior", J.Geophys.Res., 107, B4,
571 * 2002. The MHB2000 code itself was obtained on 9th September 2002
572 * from ftp://maia.usno.navy.mil/conv2000/chapter5/IAU2000A.
573 *
574 *@version 2009 December 17
575 *
576 * @since Release 20101201
577 *
578 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
579 */
580 public static FrameBias jauBi00()
581 {
582 /* The frame bias corrections in longitude and obliquity */
583 final double DPBIAS = -0.041775 * DAS2R,
584 DEBIAS = -0.0068192 * DAS2R;
585
586 /* The ICRS RA of the J2000.0 equinox (Chapront et al., 2002) */
587 final double DRA0 = -0.0146 * DAS2R;
588
589
590 /* Return the results (which are fixed). */
591 FrameBias retval = new FrameBias();
592 retval.dpsibi = DPBIAS;
593 retval.depsbi = DEBIAS;
594 retval.dra = DRA0;
595
596 return retval;
597
598 }
599
600
601 /**
602 * Frame bias and precession, IAU 2000.
603 *
604 *<p>This function is derived from the International Astronomical Union's
605 * SOFA (Standards Of Fundamental Astronomy) software collection.
606 *
607 *<p>Status: canonical model.
608 *
609 *<!-- Given: -->
610 * @param date1 double TT as a 2-part Julian Date (Note 1)
611 * @param date2 double TT as a 2-part Julian Date (Note 1)
612 *
613 *<!-- Returned: -->
614 * @param rb double[3][3] <u>returned</u> frame bias matrix (Note 2)
615 * @param rp double[3][3] <u>returned</u> precession matrix (Note 3)
616 * @param rbp double[3][3] <u>returned</u> bias-precession matrix (Note 4)
617 *
618 * <p>Notes:
619 * <ol>
620 *
621 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
622 * convenient way between the two arguments. For example,
623 * JD(TT)=2450123.7 could be expressed in any of these ways,
624 * among others:
625 *<pre>
626 * date1 date2
627 *
628 * 2450123.7 0.0 (JD method)
629 * 2451545.0 -1421.3 (J2000 method)
630 * 2400000.5 50123.2 (MJD method)
631 * 2450123.5 0.2 (date &time method)
632 *</pre>
633 * The JD method is the most natural and convenient to use in
634 * cases where the loss of several decimal digits of resolution
635 * is acceptable. The J2000 method is best matched to the way
636 * the argument is handled internally and will deliver the
637 * optimum resolution. The MJD method and the date &time methods
638 * are both good compromises between resolution and convenience.
639 *
640 * <li> The matrix rb transforms vectors from GCRS to mean J2000.0 by
641 * applying frame bias.
642 *
643 * <li> The matrix rp transforms vectors from J2000.0 mean equator and
644 * equinox to mean equator and equinox of date by applying
645 * precession.
646 *
647 * <li> The matrix rbp transforms vectors from GCRS to mean equator and
648 * equinox of date by applying frame bias then precession. It is
649 * the product rp x rb.
650 *
651 * <li> It is permissible to re-use the same array in the returned
652 * arguments. The arrays are filled in the order given.
653 *</ol>
654 *<p>Called:<ul>
655 * <li>{@link #jauBi00} frame bias components, IAU 2000
656 * <li>{@link #jauPr00} IAU 2000 precession adjustments
657 * <li>{@link #jauIr} initialize r-matrix to identity
658 * <li>{@link #jauRx} rotate around X-axis
659 * <li>{@link #jauRy} rotate around Y-axis
660 * <li>{@link #jauRz} rotate around Z-axis
661 * <li>{@link #jauCr} copy r-matrix
662 * <li>{@link #jauRxr} product of two r-matrices
663 * </ul>
664 *<p>Reference:
665 * "Expressions for the Celestial Intermediate Pole and Celestial
666 * Ephemeris Origin consistent with the IAU 2000A precession-
667 * nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
668 *
669 * n.b. The celestial ephemeris origin (CEO) was renamed "celestial
670 * intermediate origin" (CIO) by IAU 2006 Resolution 2.
671 *
672 *@version 2010 January 18
673 *
674 * @since Release 20101201
675 *
676 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
677 */
678 public static void jauBp00(final double date1, final double date2,
679 double rb[][], double rp[][], double rbp[][])
680 {
681 /* J2000.0 obliquity (Lieske et al. 1977) */
682 final double EPS0 = 84381.448 * DAS2R;
683
684 double t, dpsibi, depsbi;
685 double dra0, psia77, oma77, chia, dpsipr, depspr, psia, oma,
686 rbw[][] = new double[3][3];
687
688
689 /* Interval between fundamental epoch J2000.0 and current date (JC). */
690 t = ((date1 - DJ00) + date2) / DJC;
691
692 /* Frame bias. */
693 FrameBias fb = jauBi00();
694 dpsibi = fb.dpsibi;
695 depsbi = fb.depsbi;
696 dra0 = fb.dra;
697 /* Precession angles (Lieske et al. 1977) */
698 psia77 = (5038.7784 + (-1.07259 + (-0.001147) * t) * t) * t * DAS2R;
699 oma77 = EPS0 + ((0.05127 + (-0.007726) * t) * t) * t * DAS2R;
700 chia = ( 10.5526 + (-2.38064 + (-0.001125) * t) * t) * t * DAS2R;
701
702 /* Apply IAU 2000 precession corrections. */
703 PrecessionDeltaTerms pc = jauPr00(date1, date2);
704 dpsipr = pc.dpsipr; depspr = pc.depspr;
705 psia = psia77 + dpsipr;
706 oma = oma77 + depspr;
707
708 /* Frame bias matrix: GCRS to J2000.0. */
709 jauIr(rbw);
710 jauRz(dra0, rbw);
711 jauRy(dpsibi * sin(EPS0), rbw);
712 jauRx(-depsbi, rbw);
713 jauCr(rbw, rb);
714
715 /* Precession matrix: J2000.0 to mean of date. */
716 jauIr(rp);
717 jauRx(EPS0, rp);
718 jauRz(-psia, rp);
719 jauRx(-oma, rp);
720 jauRz(chia, rp);
721
722 /* Bias-precession matrix: GCRS to mean of date. */
723 double[][] rt = jauRxr(rp, rbw );
724 jauCr(rt, rbp);
725 return;
726
727 }
728
729
730 /**
731 * Frame bias and precession, IAU 2006.
732 *
733 *<p>This function is derived from the International Astronomical Union's
734 * SOFA (Standards Of Fundamental Astronomy) software collection.
735 *
736 *<p>Status: support function.
737 *
738 *<!-- Given: -->
739 * @param date1 double TT as a 2-part Julian Date (Note 1)
740 * @param date2 double TT as a 2-part Julian Date (Note 1)
741 *
742 *<!-- Returned: -->
743 * @param rb double[3][3] <u>returned</u> frame bias matrix (Note 2)
744 * @param rp double[3][3] <u>returned</u> precession matrix (Note 3)
745 * @param rbp double[3][3] <u>returned</u> bias-precession matrix (Note 4)
746 *
747 * <p>Notes:
748 * <ol>
749 *
750 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
751 * convenient way between the two arguments. For example,
752 * JD(TT)=2450123.7 could be expressed in any of these ways,
753 * among others:
754 *<pre>
755 * date1 date2
756 *
757 * 2450123.7 0.0 (JD method)
758 * 2451545.0 -1421.3 (J2000 method)
759 * 2400000.5 50123.2 (MJD method)
760 * 2450123.5 0.2 (date &time method)
761 *</pre>
762 * The JD method is the most natural and convenient to use in
763 * cases where the loss of several decimal digits of resolution
764 * is acceptable. The J2000 method is best matched to the way
765 * the argument is handled internally and will deliver the
766 * optimum resolution. The MJD method and the date &time methods
767 * are both good compromises between resolution and convenience.
768 *
769 * <li> The matrix rb transforms vectors from GCRS to mean J2000.0 by
770 * applying frame bias.
771 *
772 * <li> The matrix rp transforms vectors from mean J2000.0 to mean of
773 * date by applying precession.
774 *
775 * <li> The matrix rbp transforms vectors from GCRS to mean of date by
776 * applying frame bias then precession. It is the product rp x rb.
777 *
778 * <li> It is permissible to re-use the same array in the returned
779 * arguments. The arrays are filled in the order given.
780 *</ol>
781 *<p>Called:<ul>
782 * <li>{@link #jauPfw06} bias-precession F-W angles, IAU 2006
783 * <li>{@link #jauFw2m} F-W angles to r-matrix
784 * <li>{@link #jauPmat06} PB matrix, IAU 2006
785 * <li>{@link #jauTr} transpose r-matrix
786 * <li>{@link #jauRxr} product of two r-matrices
787 * </ul>
788 *<p>References:
789 *
790 * <p>Capitaine, N. &Wallace, P.T., 2006, Astron.Astrophys. 450, 855
791 *
792 * <p>Wallace, P.T. &Capitaine, N., 2006, Astron.Astrophys. 459, 981
793 *
794 *@version 2009 December 17
795 *
796 * @since Release 20101201
797 *
798 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
799 */
800 public static void jauBp06(final double date1, final double date2,
801 double rb[][], double rp[][], double rbp[][])
802 {
803 double rbt[][];
804
805
806 /* B matrix. */
807 FWPrecessionAngles fw = jauPfw06(DJM0, DJM00);
808 double[][] rt = jauFw2m(fw.gamb, fw.phib, fw.psib, fw.epsa);
809 jauCr(rt, rb);
810
811 /* PxB matrix. */
812 rt = jauPmat06(date1, date2 );
813 jauCr(rt, rbp);
814
815 /* P matrix. */
816 rbt = jauTr(rb);
817 rt = jauRxr(rbp, rbt);
818 jauCr(rt, rp);
819
820 return;
821
822 }
823
824 /**
825 * The components x,y are components of the Celestial Intermediate
826 * Pole unit vector in the Geocentric Celestial Reference System.
827 *
828 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 29 Jan 2010
829 *
830 * @since AIDA Stage 1
831 */
832 public static class CelestialIntermediatePole {
833 public double x;
834 public double y;
835 public CelestialIntermediatePole(double x, double y) {
836 this.x = x;
837 this.y = y;
838 }
839 }
840 /**
841 * Extract from the bias-precession-nutation matrix the X,Y coordinates
842 * of the Celestial Intermediate Pole.
843 *
844 *<p>This function is derived from the International Astronomical Union's
845 * SOFA (Standards Of Fundamental Astronomy) software collection.
846 *
847 *<p>Status: support function.
848 *
849 *<!-- Given: -->
850 * @param rbpn double[3][3] celestial-to-true matrix (Note 1)
851 *
852 *<!-- Returned: -->
853 * @return <u>returned</u> Celestial Intermediate Pole (Note 2)
854 *
855 * <p>Notes:
856 * <ol>
857 *
858 * <li> The matrix rbpn transforms vectors from GCRS to true equator (and
859 * CIO or equinox) of date, and therefore the Celestial Intermediate
860 * Pole unit vector is the bottom row of the matrix.
861 *
862 * <li> The arguments x,y are components of the Celestial Intermediate
863 * Pole unit vector in the Geocentric Celestial Reference System.
864 *</ol>
865 *<p>Reference:
866 *
867 * "Expressions for the Celestial Intermediate Pole and Celestial
868 * Ephemeris Origin consistent with the IAU 2000A precession-
869 * nutation model", Astron.Astrophys. 400, 1145-1154
870 * (2003)
871 *
872 * n.b. The celestial ephemeris origin (CEO) was renamed "celestial
873 * intermediate origin" (CIO) by IAU 2006 Resolution 2.
874 *
875 *@version 2010 January 18
876 *
877 * @since Release 20101201
878 *
879 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
880 */
881 public static CelestialIntermediatePole jauBpn2xy(double rbpn[][])
882 {
883 /* Extract the X,Y coordinates. */
884
885 return new CelestialIntermediatePole(rbpn[2][0], rbpn[2][1]);
886
887 }
888
889
890 /**
891 * Form the celestial-to-intermediate matrix for a given date using the
892 * IAU 2000A precession-nutation model.
893 *
894 *<p>This function is derived from the International Astronomical Union's
895 * SOFA (Standards Of Fundamental Astronomy) software collection.
896 *
897 *<p>Status: support function.
898 *
899 *<!-- Given: -->
900 * @param date1 double TT as a 2-part Julian Date (Note 1)
901 * @param date2 double TT as a 2-part Julian Date (Note 1)
902 *
903 *<!-- Returned: -->
904 * @return rc2i double[3][3] <u>returned</u> celestial-to-intermediate matrix (Note 2)
905 *
906 * <p>Notes:
907 * <ol>
908 *
909 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
910 * convenient way between the two arguments. For example,
911 * JD(TT)=2450123.7 could be expressed in any of these ways,
912 * among others:
913 *<pre>
914 * date1 date2
915 *
916 * 2450123.7 0.0 (JD method)
917 * 2451545.0 -1421.3 (J2000 method)
918 * 2400000.5 50123.2 (MJD method)
919 * 2450123.5 0.2 (date &time method)
920 *</pre>
921 * The JD method is the most natural and convenient to use in
922 * cases where the loss of several decimal digits of resolution
923 * is acceptable. The J2000 method is best matched to the way
924 * the argument is handled internally and will deliver the
925 * optimum resolution. The MJD method and the date &time methods
926 * are both good compromises between resolution and convenience.
927 *
928 * <li> The matrix rc2i is the first stage in the transformation from
929 * celestial to terrestrial coordinates:
930 *
931 * [TRS] = RPOM * R_3(ERA) * rc2i * [CRS]
932 *
933 * = rc2t * [CRS]
934 *
935 * where [CRS] is a vector in the Geocentric Celestial Reference
936 * System and [TRS] is a vector in the International Terrestrial
937 * Reference System (see IERS Conventions 2003), ERA is the Earth
938 * Rotation Angle and RPOM is the polar motion matrix.
939 *
940 * <li> A faster, but slightly less accurate result (about 1 mas), can be
941 * obtained by using instead the jauC2i00b function.
942 *</ol>
943 *<p>Called:<ul>
944 * <li>{@link #jauPnm00a} classical NPB matrix, IAU 2000A
945 * <li>{@link #jauC2ibpn} celestial-to-intermediate matrix, given NPB matrix
946 * </ul>
947 *<p>References:
948 *<ul>
949 * <li>"Expressions for the Celestial Intermediate Pole and Celestial
950 * Ephemeris Origin consistent with the IAU 2000A precession-
951 * nutation model", Astron.Astrophys. 400, 1145-1154
952 * (2003)
953 *
954 * n.b. The celestial ephemeris origin (CEO) was renamed "celestial
955 * intermediate origin" (CIO) by IAU 2006 Resolution 2.
956 *
957 * <li>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
958 * IERS Technical Note No. 32, BKG (2004)
959 *</ul>
960 *@version 2010 January 18
961 *
962 * @since Release 20101201
963 *
964 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
965 */
966 public static double[][] jauC2i00a(double date1, double date2)
967 {
968
969
970 /* Obtain the celestial-to-true matrix (IAU 2000A). */
971 double rbpn[][] = jauPnm00a(date1, date2);
972
973 /* Form the celestial-to-intermediate matrix. */
974 double rc2i[][] =jauC2ibpn(date1, date2, rbpn);
975
976 return rc2i;
977
978 }
979
980
981 /**
982 * Form the celestial-to-intermediate matrix for a given date using the
983 * IAU 2000B precession-nutation model.
984 *
985 *<p>This function is derived from the International Astronomical Union's
986 * SOFA (Standards Of Fundamental Astronomy) software collection.
987 *
988 *<p>Status: support function.
989 *
990 *<!-- Given: -->
991 * @param date1 double TT as a 2-part Julian Date (Note 1)
992 * @param date2 double TT as a 2-part Julian Date (Note 1)
993 *
994 *<!-- Returned: -->
995 * @return rc2i double[3][3] <u>returned</u> celestial-to-intermediate matrix (Note 2)
996 *
997 * <p>Notes:
998 * <ol>
999 *
1000 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
1001 * convenient way between the two arguments. For example,
1002 * JD(TT)=2450123.7 could be expressed in any of these ways,
1003 * among others:
1004 *<pre>
1005 * date1 date2
1006 *
1007 * 2450123.7 0.0 (JD method)
1008 * 2451545.0 -1421.3 (J2000 method)
1009 * 2400000.5 50123.2 (MJD method)
1010 * 2450123.5 0.2 (date &time method)
1011 *</pre>
1012 * The JD method is the most natural and convenient to use in
1013 * cases where the loss of several decimal digits of resolution
1014 * is acceptable. The J2000 method is best matched to the way
1015 * the argument is handled internally and will deliver the
1016 * optimum resolution. The MJD method and the date &time methods
1017 * are both good compromises between resolution and convenience.
1018 *
1019 * <li> The matrix rc2i is the first stage in the transformation from
1020 * celestial to terrestrial coordinates:
1021 *
1022 * [TRS] = RPOM * R_3(ERA) * rc2i * [CRS]
1023 *
1024 * = rc2t * [CRS]
1025 *
1026 * where [CRS] is a vector in the Geocentric Celestial Reference
1027 * System and [TRS] is a vector in the International Terrestrial
1028 * Reference System (see IERS Conventions 2003), ERA is the Earth
1029 * Rotation Angle and RPOM is the polar motion matrix.
1030 *
1031 * <li> The present function is faster, but slightly less accurate (about
1032 * 1 mas), than the jauC2i00a function.
1033 *</ol>
1034 *<p>Called:<ul>
1035 * <li>{@link #jauPnm00b} classical NPB matrix, IAU 2000B
1036 * <li>{@link #jauC2ibpn} celestial-to-intermediate matrix, given NPB matrix
1037 * </ul>
1038 *<p>References:
1039 *
1040 * <p> "Expressions for the Celestial Intermediate Pole and Celestial
1041 * Ephemeris Origin consistent with the IAU 2000A precession-
1042 * nutation model", Astron.Astrophys. 400, 1145-1154
1043 * (2003)
1044 *
1045 * n.b. The celestial ephemeris origin (CEO) was renamed "celestial
1046 * intermediate origin" (CIO) by IAU 2006 Resolution 2.
1047 *
1048 * <p> McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1049 * IERS Technical Note No. 32, BKG (2004)
1050 *
1051 *@version 2010 January 18
1052 *
1053 * @since Release 20101201
1054 *
1055 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
1056 */
1057 public static double[][] jauC2i00b(double date1, double date2)
1058 {
1059 double rbpn[][];
1060 double rc2i[][];
1061
1062 /* Obtain the celestial-to-true matrix (IAU 2000B). */
1063 rbpn = jauPnm00b(date1, date2 );
1064
1065 /* Form the celestial-to-intermediate matrix. */
1066 rc2i = jauC2ibpn(date1, date2, rbpn);
1067
1068 return rc2i;
1069
1070 }
1071
1072
1073 /**
1074 * Form the celestial-to-intermediate matrix for a given date using the
1075 * IAU 2006 precession and IAU 2000A nutation models.
1076 *
1077 *<p>This function is derived from the International Astronomical Union's
1078 * SOFA (Standards Of Fundamental Astronomy) software collection.
1079 *
1080 *<p>Status: support function.
1081 *
1082 *<!-- Given: -->
1083 * @param date1 double TT as a 2-part Julian Date (Note 1)
1084 * @param date2 double TT as a 2-part Julian Date (Note 1)
1085 *
1086 *<!-- Returned: -->
1087 * @return rc2i double[3][3] <u>returned</u> celestial-to-intermediate matrix (Note 2)
1088 *
1089 * <p>Notes:
1090 * <ol>
1091 *
1092 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
1093 * convenient way between the two arguments. For example,
1094 * JD(TT)=2450123.7 could be expressed in any of these ways,
1095 * among others:
1096 *<pre>
1097 * date1 date2
1098 *
1099 * 2450123.7 0.0 (JD method)
1100 * 2451545.0 -1421.3 (J2000 method)
1101 * 2400000.5 50123.2 (MJD method)
1102 * 2450123.5 0.2 (date &time method)
1103 *</pre>
1104 * The JD method is the most natural and convenient to use in
1105 * cases where the loss of several decimal digits of resolution
1106 * is acceptable. The J2000 method is best matched to the way
1107 * the argument is handled internally and will deliver the
1108 * optimum resolution. The MJD method and the date &time methods
1109 * are both good compromises between resolution and convenience.
1110 *
1111 * <li> The matrix rc2i is the first stage in the transformation from
1112 * celestial to terrestrial coordinates:
1113 *
1114 * [TRS] = RPOM * R_3(ERA) * rc2i * [CRS]
1115 *
1116 * = RC2T * [CRS]
1117 *
1118 * where [CRS] is a vector in the Geocentric Celestial Reference
1119 * System and [TRS] is a vector in the International Terrestrial
1120 * Reference System (see IERS Conventions 2003), ERA is the Earth
1121 * Rotation Angle and RPOM is the polar motion matrix.
1122 *</ol>
1123 *<p>Called:<ul>
1124 * <li>{@link #jauPnm06a} classical NPB matrix, IAU 2006/2000A
1125 * <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
1126 * <li>{@link #jauS06} the CIO locator s, Given X,Y, IAU 2006
1127 * <li>{@link #jauC2ixys} celestial-to-intermediate matrix, Given X,Y and s
1128 * </ul>
1129 *<p>References:
1130 *
1131 * <p>McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003),
1132 * IERS Technical Note No. 32, BKG
1133 *
1134 *@version 2008 May 13
1135 *
1136 * @since Release 20101201
1137 *
1138 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
1139 */
1140 public static double[][] jauC2i06a(double date1, double date2)
1141 {
1142 double rbpn[][], s, rc2i[][];
1143
1144
1145 /* Obtain the celestial-to-true matrix (IAU 2006/2000A). */
1146 rbpn = jauPnm06a(date1, date2);
1147
1148 /* Extract the X,Y coordinates. */
1149 CelestialIntermediatePole cip = jauBpn2xy(rbpn);
1150
1151 /* Obtain the CIO locator. */
1152 s = jauS06(date1, date2, cip.x, cip.y);
1153
1154 /* Form the celestial-to-intermediate matrix. */
1155 rc2i = jauC2ixys(cip.x, cip.y, s);
1156
1157 return rc2i;
1158
1159 }
1160
1161
1162 /**
1163 * Form the celestial-to-intermediate matrix for a given date given
1164 * the bias-precession-nutation matrix. IAU 2000.
1165 *
1166 *<p>This function is derived from the International Astronomical Union's
1167 * SOFA (Standards Of Fundamental Astronomy) software collection.
1168 *
1169 *<p>Status: support function.
1170 *
1171 *<!-- Given: -->
1172 * @param date1 double TT as a 2-part Julian Date (Note 1)
1173 * @param date2 double TT as a 2-part Julian Date (Note 1)
1174 * @param rbpn double[3][3] celestial-to-true matrix (Note 2)
1175 *
1176 *<!-- Returned: -->
1177 * @return rc2i double[3][3] <u>returned</u> celestial-to-intermediate matrix (Note 3)
1178 *
1179 * <p>Notes:
1180 * <ol>
1181 *
1182 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
1183 * convenient way between the two arguments. For example,
1184 * JD(TT)=2450123.7 could be expressed in any of these ways,
1185 * among others:
1186 *<pre>
1187 * date1 date2
1188 *
1189 * 2450123.7 0.0 (JD method)
1190 * 2451545.0 -1421.3 (J2000 method)
1191 * 2400000.5 50123.2 (MJD method)
1192 * 2450123.5 0.2 (date &time method)
1193 *</pre>
1194 * The JD method is the most natural and convenient to use in
1195 * cases where the loss of several decimal digits of resolution
1196 * is acceptable. The J2000 method is best matched to the way
1197 * the argument is handled internally and will deliver the
1198 * optimum resolution. The MJD method and the date &time methods
1199 * are both good compromises between resolution and convenience.
1200 *
1201 * <li> The matrix rbpn transforms vectors from GCRS to true equator (and
1202 * CIO or equinox) of date. Only the CIP (bottom row) is used.
1203 *
1204 * <li> The matrix rc2i is the first stage in the transformation from
1205 * celestial to terrestrial coordinates:
1206 *
1207 * [TRS] = RPOM * R_3(ERA) * rc2i * [CRS]
1208 *
1209 * = RC2T * [CRS]
1210 *
1211 * where [CRS] is a vector in the Geocentric Celestial Reference
1212 * System and [TRS] is a vector in the International Terrestrial
1213 * Reference System (see IERS Conventions 2003), ERA is the Earth
1214 * Rotation Angle and RPOM is the polar motion matrix.
1215 *
1216 * <li> Although its name does not include "00", This function is in fact
1217 * specific to the IAU 2000 models.
1218 *</ol>
1219 *<p>Called:<ul>
1220 * <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
1221 * <li>{@link #jauC2ixy} celestial-to-intermediate matrix, given X,Y
1222 * </ul>
1223 *<p>References:
1224 * <p> "Expressions for the Celestial Intermediate Pole and Celestial
1225 * Ephemeris Origin consistent with the IAU 2000A precession-
1226 * nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
1227 *
1228 * <p>n.b. The celestial ephemeris origin (CEO) was renamed "celestial
1229 * intermediate origin" (CIO) by IAU 2006 Resolution 2.
1230 *
1231 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1232 * IERS Technical Note No. 32, BKG (2004)
1233 *
1234 *@version 2010 January 18
1235 *
1236 * @since Release 20101201
1237 *
1238 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
1239 */
1240 public static double[][] jauC2ibpn(double date1, double date2, double rbpn[][])
1241 {
1242
1243 /* Extract the X,Y coordinates. */
1244 CelestialIntermediatePole cip = jauBpn2xy(rbpn);
1245
1246
1247 /* Form the celestial-to-intermediate matrix (n.b. IAU 2000 specific). */
1248 double rc2i[][] =jauC2ixy(date1, date2, cip.x, cip.y);
1249
1250 return rc2i;
1251
1252 }
1253
1254
1255 /**
1256 * Form the celestial to intermediate-frame-of-date matrix for a given
1257 * date when the CIP X,Y coordinates are known. IAU 2000.
1258 *
1259 *<p>This function is derived from the International Astronomical Union's
1260 * SOFA (Standards Of Fundamental Astronomy) software collection.
1261 *
1262 *<p>Status: support function.
1263 *
1264 *<!-- Given: -->
1265 * @param date1 double TT as a 2-part Julian Date (Note 1)
1266 * @param date2 double TT as a 2-part Julian Date (Note 1)
1267 * @param x double Celestial Intermediate Pole (Note 2)
1268 * @param y double Celestial Intermediate Pole (Note 2)
1269 *
1270 *<!-- Returned: -->
1271 * @return rc2i double[3][3] <u>returned</u> celestial-to-intermediate matrix (Note 3)
1272 *
1273 * <p>Notes:
1274 * <ol>
1275 *
1276 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
1277 * convenient way between the two arguments. For example,
1278 * JD(TT)=2450123.7 could be expressed in any of these ways,
1279 * among others:
1280 *<pre>
1281 * date1 date2
1282 *
1283 * 2450123.7 0.0 (JD method)
1284 * 2451545.0 -1421.3 (J2000 method)
1285 * 2400000.5 50123.2 (MJD method)
1286 * 2450123.5 0.2 (date &time method)
1287 *</pre>
1288 * The JD method is the most natural and convenient to use in
1289 * cases where the loss of several decimal digits of resolution
1290 * is acceptable. The J2000 method is best matched to the way
1291 * the argument is handled internally and will deliver the
1292 * optimum resolution. The MJD method and the date &time methods
1293 * are both good compromises between resolution and convenience.
1294 *
1295 * <li> The Celestial Intermediate Pole coordinates are the x,y components
1296 * of the unit vector in the Geocentric Celestial Reference System.
1297 *
1298 * <li> The matrix rc2i is the first stage in the transformation from
1299 * celestial to terrestrial coordinates:
1300 *
1301 * [TRS] = RPOM * R_3(ERA) * rc2i * [CRS]
1302 *
1303 * = RC2T * [CRS]
1304 *
1305 * where [CRS] is a vector in the Geocentric Celestial Reference
1306 * System and [TRS] is a vector in the International Terrestrial
1307 * Reference System (see IERS Conventions 2003), ERA is the Earth
1308 * Rotation Angle and RPOM is the polar motion matrix.
1309 *
1310 * <li> Although its name does not include "00", This function is in fact
1311 * specific to the IAU 2000 models.
1312 *</ol>
1313 *<p>Called:<ul>
1314 * <li>{@link #jauC2ixys} celestial-to-intermediate matrix, given X,Y and s
1315 * <li>{@link #jauS00} the CIO locator s, given X,Y, IAU 2000A
1316 * </ul>
1317 *<p>Reference:
1318 *
1319 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1320 * IERS Technical Note No. 32, BKG (2004)
1321 *
1322 *@version 2008 May 11
1323 *
1324 * @since Release 20101201
1325 *
1326 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
1327 */
1328
1329 public static double[][] jauC2ixy(double date1, double date2, double x, double y)
1330 {
1331 /* Compute s and then the matrix. */
1332 double rc2i[][] = jauC2ixys(x, y, jauS00(date1, date2, x, y));
1333
1334 return rc2i;
1335
1336 }
1337
1338
1339 /**
1340 * Form the celestial to intermediate-frame-of-date matrix given the CIP
1341 * X,Y and the CIO locator s.
1342 *
1343 *<p>This function is derived from the International Astronomical Union's
1344 * SOFA (Standards Of Fundamental Astronomy) software collection.
1345 *
1346 *<p>Status: support function.
1347 *
1348 *<!-- Given: -->
1349 * @param x double Celestial Intermediate Pole (Note 1)
1350 * @param y double Celestial Intermediate Pole (Note 1)
1351 * @param s double the CIO locator s (Note 2)
1352 *
1353 *<!-- Returned: -->
1354 * @return rc2i double[3][3] <u>returned</u> celestial-to-intermediate matrix (Note 3)
1355 *
1356 * <p>Notes:
1357 * <ol>
1358 *
1359 * <li> The Celestial Intermediate Pole coordinates are the x,y
1360 * components of the unit vector in the Geocentric Celestial
1361 * Reference System.
1362 *
1363 * <li> The CIO locator s (in radians) positions the Celestial
1364 * Intermediate Origin on the equator of the CIP.
1365 *
1366 * <li> The matrix rc2i is the first stage in the transformation from
1367 * celestial to terrestrial coordinates:
1368 *
1369 * [TRS] = RPOM * R_3(ERA) * rc2i * [CRS]
1370 *
1371 * = RC2T * [CRS]
1372 *
1373 * where [CRS] is a vector in the Geocentric Celestial Reference
1374 * System and [TRS] is a vector in the International Terrestrial
1375 * Reference System (see IERS Conventions 2003), ERA is the Earth
1376 * Rotation Angle and RPOM is the polar motion matrix.
1377 *</ol>
1378 *<p>Called:<ul>
1379 * <li>{@link #jauIr} initialize r-matrix to identity
1380 * <li>{@link #jauRz} rotate around Z-axis
1381 * <li>{@link #jauRy} rotate around Y-axis
1382 * </ul>
1383 *<p>Reference:
1384 *
1385 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1386 * IERS Technical Note No. 32, BKG (2004)
1387 *
1388 *@version 2008 May 11
1389 *
1390 * @since Release 20101201
1391 *
1392 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
1393 */
1394 public static double[][] jauC2ixys(double x, double y, double s)
1395 {
1396 double r2, e, d;
1397 double rc2i[][] = new double[3][3];
1398
1399 /* Obtain the spherical angles E and d. */
1400 r2 = x*x + y*y;
1401 e = (r2 > 0.0) ? atan2(y, x) : 0.0;
1402 d = atan(sqrt(r2 / (1.0 - r2)));
1403
1404 /* Form the matrix. */
1405 jauIr(rc2i);
1406 jauRz(e, rc2i);
1407 jauRy(d, rc2i);
1408 jauRz(-(e+s), rc2i);
1409
1410 return rc2i;
1411
1412 }
1413
1414 /**
1415 * P-vector to spherical coordinates.
1416 *
1417 *<p>This function is derived from the International Astronomical Union's
1418 * SOFA (Standards Of Fundamental Astronomy) software collection.
1419 *
1420 *<p>Status: vector/matrix support function.
1421 *
1422 *<!-- Given: -->
1423 * @param p double[3] p-vector
1424 *
1425 *<!-- Returned: -->
1426 * @return theta double <u>returned</u> longitude angle (radians)
1427 * phi double <u>returned</u> latitude angle (radians)
1428 *
1429 * <p>Notes:
1430 * <ol>
1431 *
1432 * <li> The vector p can have any magnitude; only its direction is used.
1433 *
1434 * <li> If p is null, zero theta and phi are returned.
1435 *
1436 * <li> At either pole, zero theta is returned.
1437 *</ol>
1438 *@version 2008 May 11
1439 *
1440 * @since Release 20101201
1441 *
1442 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
1443 */
1444 public static SphericalCoordinate jauC2s(double p[])
1445 {
1446 double x, y, z, d2;
1447
1448
1449 x = p[0];
1450 y = p[1];
1451 z = p[2];
1452 d2 = x*x + y*y;
1453
1454 double theta = (d2 == 0.0) ? 0.0 : atan2(y, x);
1455 double phi = (z == 0.0) ? 0.0 : atan2(z, sqrt(d2));
1456
1457 return new SphericalCoordinate(theta, phi);
1458
1459 }
1460
1461
1462 /**
1463 * Form the celestial to terrestrial matrix given the date, the UT1 and
1464 * the polar motion, using the IAU 2000A nutation model.
1465 *
1466 *<p>This function is derived from the International Astronomical Union's
1467 * SOFA (Standards Of Fundamental Astronomy) software collection.
1468 *
1469 *<p>Status: support function.
1470 *
1471 *<!-- Given: -->
1472 * @param tta double TT as a 2-part Julian Date (Note 1)
1473 * @param ttb double TT as a 2-part Julian Date (Note 1)
1474 * @param uta double UT1 as a 2-part Julian Date (Note 1)
1475 * @param utb double UT1 as a 2-part Julian Date (Note 1)
1476 * @param xp double coordinates of the pole (radians, Note 2)
1477 * @param yp double coordinates of the pole (radians, Note 2)
1478 *
1479 *<!-- Returned: -->
1480 * @return rc2t double[3][3] <u>returned</u> celestial-to-terrestrial matrix (Note 3)
1481 *
1482 * <p>Notes:
1483 * <ol>
1484 *
1485 * <li> The TT and UT1 dates tta+ttb and uta+utb are Julian Dates,
1486 * apportioned in any convenient way between the arguments uta and
1487 * utb. For example, JD(UT1)=2450123.7 could be expressed in any of
1488 * these ways, among others:
1489 *<pre>
1490 * uta utb
1491 *
1492 * 2450123.7 0.0 (JD method)
1493 * 2451545.0 -1421.3 (J2000 method)
1494 * 2400000.5 50123.2 (MJD method)
1495 * 2450123.5 0.2 (date &time method)
1496 *</pre>
1497 * The JD method is the most natural and convenient to use in
1498 * cases where the loss of several decimal digits of resolution is
1499 * acceptable. The J2000 and MJD methods are good compromises
1500 * between resolution and convenience. In the case of uta,utb, the
1501 * date &time method is best matched to the Earth rotation angle
1502 * algorithm used: maximum precision is delivered when the uta
1503 * argument is for 0hrs UT1 on the day in question and the utb
1504 * argument lies in the range 0 to 1, or vice versa.
1505 *
1506 * <li> The arguments xp and yp are the coordinates (in radians) of the
1507 * Celestial Intermediate Pole with respect to the International
1508 * Terrestrial Reference System (see IERS Conventions 2003),
1509 * measured along the meridians to 0 and 90 deg west respectively.
1510 *
1511 * <li> The matrix rc2t transforms from celestial to terrestrial
1512 * coordinates:
1513 *
1514 * [TRS] = RPOM * R_3(ERA) * RC2I * [CRS]
1515 *
1516 * = rc2t * [CRS]
1517 *
1518 * where [CRS] is a vector in the Geocentric Celestial Reference
1519 * System and [TRS] is a vector in the International Terrestrial
1520 * Reference System (see IERS Conventions 2003), RC2I is the
1521 * celestial-to-intermediate matrix, ERA is the Earth rotation
1522 * angle and RPOM is the polar motion matrix.
1523 *
1524 * <li> A faster, but slightly less accurate result (about 1 mas), can
1525 * be obtained by using instead the jauC2t00b function.
1526 *</ol>
1527 *<p>Called:<ul>
1528 * <li>{@link #jauC2i00a} celestial-to-intermediate matrix, IAU 2000A
1529 * <li>{@link #jauEra00} Earth rotation angle, IAU 2000
1530 * <li>{@link #jauSp00} the TIO locator s', IERS 2000
1531 * <li>{@link #jauPom00} polar motion matrix
1532 * <li>{@link #jauC2tcio} form CIO-based celestial-to-terrestrial matrix
1533 * </ul>
1534 *<p>Reference:
1535 *
1536 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1537 * IERS Technical Note No. 32, BKG (2004)
1538 *
1539 *@version 2009 April 1
1540 *
1541 * @since Release 20101201
1542 *
1543 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
1544 */
1545 public static double[][] jauC2t00a(final double tta, final double ttb, final double uta, final double utb,
1546 final double xp, final double yp)
1547 {
1548 double rc2i[][]= new double[3][3], era, sp, rpom[][];
1549
1550
1551 /* Form the celestial-to-intermediate matrix for this TT (IAU 2000A). */
1552 rc2i = jauC2i00a(tta, ttb);
1553
1554 /* Predict the Earth rotation angle for this UT1. */
1555 era = jauEra00(uta, utb);
1556
1557 /* Estimate s'. */
1558 sp = jauSp00(tta, ttb);
1559
1560 /* Form the polar motion matrix. */
1561 rpom = jauPom00(xp, yp, sp );
1562
1563 /* Combine to form the celestial-to-terrestrial matrix. */
1564 double[][] rc2t = jauC2tcio(rc2i, era, rpom );
1565
1566 return rc2t;
1567
1568 }
1569
1570
1571 /**
1572 * Form the celestial to terrestrial matrix given the date, the UT1 and
1573 * the polar motion, using the IAU 2000B nutation model.
1574 *
1575 *<p>This function is derived from the International Astronomical Union's
1576 * SOFA (Standards Of Fundamental Astronomy) software collection.
1577 *
1578 *<p>Status: support function.
1579 *
1580 *<!-- Given: -->
1581 * @param tta double TT as a 2-part Julian Date (Note 1)
1582 * @param ttb double TT as a 2-part Julian Date (Note 1)
1583 * @param uta double UT1 as a 2-part Julian Date (Note 1)
1584 * @param utb double UT1 as a 2-part Julian Date (Note 1)
1585 * @param xp double coordinates of the pole (radians, Note 2)
1586 * @param yp double coordinates of the pole (radians, Note 2)
1587 *
1588 *<!-- Returned: -->
1589 * @return rc2t double[3][3] <u>returned</u> celestial-to-terrestrial matrix (Note 3)
1590 *
1591 * <p>Notes:
1592 * <ol>
1593 *
1594 * <li> The TT and UT1 dates tta+ttb and uta+utb are Julian Dates,
1595 * apportioned in any convenient way between the arguments uta and
1596 * utb. For example, JD(UT1)=2450123.7 could be expressed in any of
1597 * these ways, among others:
1598 *<pre>
1599 * uta utb
1600 *
1601 * 2450123.7 0.0 (JD method)
1602 * 2451545.0 -1421.3 (J2000 method)
1603 * 2400000.5 50123.2 (MJD method)
1604 * 2450123.5 0.2 (date &time method)
1605 *</pre>
1606 * The JD method is the most natural and convenient to use in
1607 * cases where the loss of several decimal digits of resolution is
1608 * acceptable. The J2000 and MJD methods are good compromises
1609 * between resolution and convenience. In the case of uta,utb, the
1610 * date &time method is best matched to the Earth rotation angle
1611 * algorithm used: maximum precision is delivered when the uta
1612 * argument is for 0hrs UT1 on the day in question and the utb
1613 * argument lies in the range 0 to 1, or vice versa.
1614 *
1615 * <li> The arguments xp and yp are the coordinates (in radians) of the
1616 * Celestial Intermediate Pole with respect to the International
1617 * Terrestrial Reference System (see IERS Conventions 2003),
1618 * measured along the meridians to 0 and 90 deg west respectively.
1619 *
1620 * <li> The matrix rc2t transforms from celestial to terrestrial
1621 * coordinates:
1622 *
1623 * [TRS] = RPOM * R_3(ERA) * RC2I * [CRS]
1624 *
1625 * = rc2t * [CRS]
1626 *
1627 * where [CRS] is a vector in the Geocentric Celestial Reference
1628 * System and [TRS] is a vector in the International Terrestrial
1629 * Reference System (see IERS Conventions 2003), RC2I is the
1630 * celestial-to-intermediate matrix, ERA is the Earth rotation
1631 * angle and RPOM is the polar motion matrix.
1632 *
1633 * <li> The present function is faster, but slightly less accurate (about
1634 * 1 mas), than the jauC2t00a function.
1635 *</ol>
1636 *<p>Called:<ul>
1637 * <li>{@link #jauC2i00b} celestial-to-intermediate matrix, IAU 2000B
1638 * <li>{@link #jauEra00} Earth rotation angle, IAU 2000
1639 * <li>{@link #jauPom00} polar motion matrix
1640 * <li>{@link #jauC2tcio} form CIO-based celestial-to-terrestrial matrix
1641 * </ul>
1642 *<p>Reference:
1643 *
1644 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1645 * IERS Technical Note No. 32, BKG (2004)
1646 *
1647 *@version 2009 April 1
1648 *
1649 * @since Release 20101201
1650 *
1651 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
1652 */
1653 public static double[][] jauC2t00b(final double tta, final double ttb, final double uta, final double utb,
1654 final double xp, final double yp )
1655 {
1656 double rc2i[][], era, rpom[][];
1657 double rc2t[][];
1658
1659 /* Form the celestial-to-intermediate matrix for this TT (IAU 2000B). */
1660 rc2i =jauC2i00b(tta, ttb);
1661
1662 /* Predict the Earth rotation angle for this UT1. */
1663 era = jauEra00(uta, utb);
1664
1665 /* Form the polar motion matrix (neglecting s'). */
1666 rpom = jauPom00(xp, yp, 0.0 );
1667
1668 /* Combine to form the celestial-to-terrestrial matrix. */
1669 rc2t = jauC2tcio(rc2i, era, rpom );
1670
1671 return rc2t;
1672
1673 }
1674
1675
1676 /**
1677 * Form the celestial to terrestrial matrix given the date, the UT1 and
1678 * the polar motion, using the IAU 2006 precession and IAU 2000A
1679 * nutation models.
1680 *
1681 *<p>This function is derived from the International Astronomical Union's
1682 * SOFA (Standards Of Fundamental Astronomy) software collection.
1683 *
1684 *<p>Status: support function.
1685 *
1686 *<!-- Given: -->
1687 * @param tta double TT as a 2-part Julian Date (Note 1)
1688 * @param ttb double TT as a 2-part Julian Date (Note 1)
1689 * @param uta double UT1 as a 2-part Julian Date (Note 1)
1690 * @param utb double UT1 as a 2-part Julian Date (Note 1)
1691 * @param xp double coordinates of the pole (radians, Note 2)
1692 * @param yp double coordinates of the pole (radians, Note 2)
1693 *
1694 *<!-- Returned: -->
1695 * @return rc2t double[3][3] <u>returned</u> celestial-to-terrestrial matrix (Note 3)
1696 *
1697 * <p>Notes:
1698 * <ol>
1699 *
1700 * <li> The TT and UT1 dates tta+ttb and uta+utb are Julian Dates,
1701 * apportioned in any convenient way between the arguments uta and
1702 * utb. For example, JD(UT1)=2450123.7 could be expressed in any of
1703 * these ways, among others:
1704 *<pre>
1705 * uta utb
1706 *
1707 * 2450123.7 0.0 (JD method)
1708 * 2451545.0 -1421.3 (J2000 method)
1709 * 2400000.5 50123.2 (MJD method)
1710 * 2450123.5 0.2 (date &time method)
1711 *</pre>
1712 * The JD method is the most natural and convenient to use in
1713 * cases where the loss of several decimal digits of resolution is
1714 * acceptable. The J2000 and MJD methods are good compromises
1715 * between resolution and convenience. In the case of uta,utb, the
1716 * date &time method is best matched to the Earth rotation angle
1717 * algorithm used: maximum precision is delivered when the uta
1718 * argument is for 0hrs UT1 on the day in question and the utb
1719 * argument lies in the range 0 to 1, or vice versa.
1720 *
1721 * <li> The arguments xp and yp are the coordinates (in radians) of the
1722 * Celestial Intermediate Pole with respect to the International
1723 * Terrestrial Reference System (see IERS Conventions 2003),
1724 * measured along the meridians to 0 and 90 deg west respectively.
1725 *
1726 * <li> The matrix rc2t transforms from celestial to terrestrial
1727 * coordinates:
1728 *
1729 * [TRS] = RPOM * R_3(ERA) * RC2I * [CRS]
1730 *
1731 * = rc2t * [CRS]
1732 *
1733 * where [CRS] is a vector in the Geocentric Celestial Reference
1734 * System and [TRS] is a vector in the International Terrestrial
1735 * Reference System (see IERS Conventions 2003), RC2I is the
1736 * celestial-to-intermediate matrix, ERA is the Earth rotation
1737 * angle and RPOM is the polar motion matrix.
1738 *</ol>
1739 *<p>Called:<ul>
1740 * <li>{@link #jauC2i06a} celestial-to-intermediate matrix, IAU 2006/2000A
1741 * <li>{@link #jauEra00} Earth rotation angle, IAU 2000
1742 * <li>{@link #jauSp00} the TIO locator s', IERS 2000
1743 * <li>{@link #jauPom00} polar motion matrix
1744 * <li>{@link #jauC2tcio} form CIO-based celestial-to-terrestrial matrix
1745 * </ul>
1746 *<p>Reference:
1747 *
1748 * <p>McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003),
1749 * IERS Technical Note No. 32, BKG
1750 *
1751 *@version 2009 April 1
1752 *
1753 * @since Release 20101201
1754 *
1755 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
1756 */
1757 public static double[][] jauC2t06a(final double tta, final double ttb, final double uta, final double utb,
1758 final double xp, final double yp)
1759 {
1760 double rc2i[][], era, sp, rpom[][], rc2t[][];
1761
1762
1763 /* Form the celestial-to-intermediate matrix for this TT. */
1764 rc2i = jauC2i06a(tta, ttb);
1765
1766 /* Predict the Earth rotation angle for this UT1. */
1767 era = jauEra00(uta, utb);
1768
1769 /* Estimate s'. */
1770 sp = jauSp00(tta, ttb);
1771
1772 /* Form the polar motion matrix. */
1773 rpom = jauPom00(xp, yp, sp );
1774
1775 /* Combine to form the celestial-to-terrestrial matrix. */
1776 rc2t = jauC2tcio(rc2i, era, rpom );
1777
1778 return rc2t;
1779
1780 }
1781
1782
1783 /**
1784 * Assemble the celestial to terrestrial matrix from CIO-based
1785 * components (the celestial-to-intermediate matrix, the Earth Rotation
1786 * Angle and the polar motion matrix).
1787 *
1788 *<p>This function is derived from the International Astronomical Union's
1789 * SOFA (Standards Of Fundamental Astronomy) software collection.
1790 *
1791 *<p>Status: support function.
1792 *
1793 *<!-- Given: -->
1794 * @param rc2i double[3][3] celestial-to-intermediate matrix
1795 * @param era double Earth rotation angle (radians)
1796 * @param rpom double[3][3] polar-motion matrix
1797 *
1798 *<!-- Returned: -->
1799 * @return rc2t double[3][3] <u>returned</u> celestial-to-terrestrial matrix
1800 *
1801 * <p>Notes:
1802 * <ol>
1803 *
1804 * <li> This function constructs the rotation matrix that transforms
1805 * vectors in the celestial system into vectors in the terrestrial
1806 * system. It does so starting from precomputed components, namely
1807 * the matrix which rotates from celestial coordinates to the
1808 * intermediate frame, the Earth rotation angle and the polar motion
1809 * matrix. One use of the present function is when generating a
1810 * series of celestial-to-terrestrial matrices where only the Earth
1811 * Rotation Angle changes, avoiding the considerable overhead of
1812 * recomputing the precession-nutation more often than necessary to
1813 * achieve given accuracy objectives.
1814 *
1815 * <li> The relationship between the arguments is as follows:
1816 *
1817 * [TRS] = RPOM * R_3(ERA) * rc2i * [CRS]
1818 *
1819 * = rc2t * [CRS]
1820 *
1821 * where [CRS] is a vector in the Geocentric Celestial Reference
1822 * System and [TRS] is a vector in the International Terrestrial
1823 * Reference System (see IERS Conventions 2003).
1824 *</ol>
1825 *<p>Called:<ul>
1826 * <li>{@link #jauCr} copy r-matrix
1827 * <li>{@link #jauRz} rotate around Z-axis
1828 * <li>{@link #jauRxr} product of two r-matrices
1829 * </ul>
1830 *<p>Reference:
1831 *
1832 * <p>McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003),
1833 * IERS Technical Note No. 32, BKG
1834 *
1835 *@version 2008 May 11
1836 *
1837 * @since Release 20101201
1838 *
1839 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
1840 */
1841 public static double[][] jauC2tcio(final double rc2i[][], final double era, final double rpom[][])
1842 {
1843 double r[][] = new double[3][3];
1844
1845
1846 /* Construct the matrix. */
1847 jauCr(rc2i, r);
1848 jauRz(era, r);
1849 double[][] rc2t = jauRxr(rpom, r);
1850
1851 return rc2t;
1852
1853 }
1854
1855
1856 /**
1857 * Assemble the celestial to terrestrial matrix from equinox-based
1858 * components (the celestial-to-true matrix, the Greenwich Apparent
1859 * Sidereal Time and the polar motion matrix).
1860 *
1861 *<p>This function is derived from the International Astronomical Union's
1862 * SOFA (Standards Of Fundamental Astronomy) software collection.
1863 *
1864 *<p>Status: support function.
1865 *
1866 *<!-- Given: -->
1867 * @param rbpn double[3][3] celestial-to-true matrix
1868 * @param gst double Greenwich (apparent) Sidereal Time (radians)
1869 * @param rpom double[3][3] polar-motion matrix
1870 *
1871 *<!-- Returned: -->
1872 * @return rc2t double[3][3] <u>returned</u> celestial-to-terrestrial matrix (Note 2)
1873 *
1874 * <p>Notes:
1875 * <ol>
1876 *
1877 * <li> This function constructs the rotation matrix that transforms
1878 * vectors in the celestial system into vectors in the terrestrial
1879 * system. It does so starting from precomputed components, namely
1880 * the matrix which rotates from celestial coordinates to the
1881 * true equator and equinox of date, the Greenwich Apparent Sidereal
1882 * Time and the polar motion matrix. One use of the present function
1883 * is when generating a series of celestial-to-terrestrial matrices
1884 * where only the Sidereal Time changes, avoiding the considerable
1885 * overhead of recomputing the precession-nutation more often than
1886 * necessary to achieve given accuracy objectives.
1887 *
1888 * <li> The relationship between the arguments is as follows:
1889 *
1890 * [TRS] = rpom * R_3(gst) * rbpn * [CRS]
1891 *
1892 * = rc2t * [CRS]
1893 *
1894 * where [CRS] is a vector in the Geocentric Celestial Reference
1895 * System and [TRS] is a vector in the International Terrestrial
1896 * Reference System (see IERS Conventions 2003).
1897 *</ol>
1898 *<p>Called:<ul>
1899 * <li>{@link #jauCr} copy r-matrix
1900 * <li>{@link #jauRz} rotate around Z-axis
1901 * <li>{@link #jauRxr} product of two r-matrices
1902 * </ul>
1903 *<p>Reference:
1904 *
1905 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1906 * IERS Technical Note No. 32, BKG (2004)
1907 *
1908 *@version 2008 May 11
1909 *
1910 * @since Release 20101201
1911 *
1912 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
1913 */
1914 public static double[][] jauC2teqx(final double rbpn[][], final double gst, final double rpom[][] )
1915 {
1916 double r[][] = new double[3][3], rc2t[][];
1917
1918
1919 /* Construct the matrix. */
1920 jauCr(rbpn, r);
1921 jauRz(gst, r);
1922 rc2t = jauRxr(rpom, r);
1923
1924 return rc2t;
1925
1926 }
1927
1928
1929 /**
1930 * Form the celestial to terrestrial matrix given the date, the UT1,
1931 * the nutation and the polar motion. IAU 2000.
1932 *
1933 *<p>This function is derived from the International Astronomical Union's
1934 * SOFA (Standards Of Fundamental Astronomy) software collection.
1935 *
1936 *<p>Status: support function.
1937 *
1938 *<!-- Given: -->
1939 * @param tta double TT as a 2-part Julian Date (Note 1)
1940 * @param ttb double TT as a 2-part Julian Date (Note 1)
1941 * @param uta double UT1 as a 2-part Julian Date (Note 1)
1942 * @param utb double UT1 as a 2-part Julian Date (Note 1)
1943 * @param dpsi double nutation (Note 2)
1944 * @param deps double nutation (Note 2)
1945 * @param xp double coordinates of the pole (radians, Note 3)
1946 * @param yp double coordinates of the pole (radians, Note 3)
1947 *
1948 *<!-- Returned: -->
1949 * @return rc2t double[3][3] <u>returned</u> celestial-to-terrestrial matrix (Note 4)
1950 *
1951 * <p>Notes:
1952 * <ol>
1953 *
1954 * <li> The TT and UT1 dates tta+ttb and uta+utb are Julian Dates,
1955 * apportioned in any convenient way between the arguments uta and
1956 * utb. For example, JD(UT1)=2450123.7 could be expressed in any of
1957 * these ways, among others:
1958 *<pre>
1959 * uta utb
1960 *
1961 * 2450123.7 0.0 (JD method)
1962 * 2451545.0 -1421.3 (J2000 method)
1963 * 2400000.5 50123.2 (MJD method)
1964 * 2450123.5 0.2 (date &time method)
1965 *</pre>
1966 * The JD method is the most natural and convenient to use in
1967 * cases where the loss of several decimal digits of resolution is
1968 * acceptable. The J2000 and MJD methods are good compromises
1969 * between resolution and convenience. In the case of uta,utb, the
1970 * date &time method is best matched to the Earth rotation angle
1971 * algorithm used: maximum precision is delivered when the uta
1972 * argument is for 0hrs UT1 on the day in question and the utb
1973 * argument lies in the range 0 to 1, or vice versa.
1974 *
1975 * <li> The caller is responsible for providing the nutation components;
1976 * they are in longitude and obliquity, in radians and are with
1977 * respect to the equinox and ecliptic of date. For high-accuracy
1978 * applications, free core nutation should be included as well as
1979 * any other relevant corrections to the position of the CIP.
1980 *
1981 * <li> The arguments xp and yp are the coordinates (in radians) of the
1982 * Celestial Intermediate Pole with respect to the International
1983 * Terrestrial Reference System (see IERS Conventions 2003),
1984 * measured along the meridians to 0 and 90 deg west respectively.
1985 *
1986 * <li> The matrix rc2t transforms from celestial to terrestrial
1987 * coordinates:
1988 *
1989 * [TRS] = RPOM * R_3(GST) * RBPN * [CRS]
1990 *
1991 * = rc2t * [CRS]
1992 *
1993 * where [CRS] is a vector in the Geocentric Celestial Reference
1994 * System and [TRS] is a vector in the International Terrestrial
1995 * Reference System (see IERS Conventions 2003), RBPN is the
1996 * bias-precession-nutation matrix, GST is the Greenwich (apparent)
1997 * Sidereal Time and RPOM is the polar motion matrix.
1998 *
1999 * <li> Although its name does not include "00", This function is in fact
2000 * specific to the IAU 2000 models.
2001 *</ol>
2002 *<p>Called:<ul>
2003 * <li>{@link #jauPn00} bias/precession/nutation results, IAU 2000
2004 * <li>{@link #jauGmst00} Greenwich mean sidereal time, IAU 2000
2005 * <li>{@link #jauSp00} the TIO locator s', IERS 2000
2006 * <li>{@link #jauEe00} equation of the equinoxes, IAU 2000
2007 * <li>{@link #jauPom00} polar motion matrix
2008 * <li>{@link #jauC2teqx} form equinox-based celestial-to-terrestrial matrix
2009 * </ul>
2010 *<p>Reference:
2011 *
2012 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
2013 * IERS Technical Note No. 32, BKG (2004)
2014 *
2015 *@version 2009 April 1
2016 *
2017 * @since Release 20101201
2018 *
2019 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
2020 */
2021 public static double[][] jauC2tpe(final double tta, final double ttb, final double uta, final double utb,
2022 final double dpsi, final double deps, final double xp, final double yp)
2023 {
2024 double rpom[][];
2025
2026 /* Form the celestial-to-true matrix for this TT. */
2027 PrecessionNutation pn = jauPn00(tta, ttb, dpsi, deps);
2028
2029 /* Predict the Greenwich Mean Sidereal Time for this UT1 and TT. */
2030 double gmst = jauGmst00(uta, utb, tta, ttb);
2031
2032 /* Predict the equation of the equinoxes given TT and nutation. */
2033 double ee = jauEe00(tta, ttb, pn.epsa, dpsi);
2034
2035 /* Estimate s'. */
2036 double sp = jauSp00(tta, ttb);
2037
2038 /* Form the polar motion matrix. */
2039 rpom = jauPom00(xp, yp, sp);
2040
2041 /* Combine to form the celestial-to-terrestrial matrix. */
2042 double[][] rc2t = jauC2teqx(pn.rbpn, gmst + ee, rpom );
2043
2044 return rc2t;
2045
2046 }
2047
2048
2049 /**
2050 * Form the celestial to terrestrial matrix given the date, the UT1,
2051 * the CIP coordinates and the polar motion. IAU 2000.
2052 *
2053 *<p>This function is derived from the International Astronomical Union's
2054 * SOFA (Standards Of Fundamental Astronomy) software collection.
2055 *
2056 *<p>Status: support function.
2057 *
2058 *<!-- Given: -->
2059 * @param tta double TT as a 2-part Julian Date (Note 1)
2060 * @param ttb double TT as a 2-part Julian Date (Note 1)
2061 * @param uta double UT1 as a 2-part Julian Date (Note 1)
2062 * @param utb double UT1 as a 2-part Julian Date (Note 1)
2063 * @param x double Celestial Intermediate Pole (Note 2)
2064 * @param y double Celestial Intermediate Pole (Note 2)
2065 * @param xp double coordinates of the pole (radians, Note 3)
2066 * @param yp double coordinates of the pole (radians, Note 3)
2067 *
2068 *<!-- Returned: -->
2069 * @return rc2t double[3][3] <u>returned</u> celestial-to-terrestrial matrix (Note 4)
2070 *
2071 * <p>Notes:
2072 * <ol>
2073 *
2074 * <li> The TT and UT1 dates tta+ttb and uta+utb are Julian Dates,
2075 * apportioned in any convenient way between the arguments uta and
2076 * utb. For example, JD(UT1)=2450123.7 could be expressed in any o
2077 * these ways, among others:
2078 *<pre>
2079 * uta utb
2080 *
2081 * 2450123.7 0.0 (JD method)
2082 * 2451545.0 -1421.3 (J2000 method)
2083 * 2400000.5 50123.2 (MJD method)
2084 * 2450123.5 0.2 (date &time method)
2085 *</pre>
2086 * The JD method is the most natural and convenient to use in
2087 * cases where the loss of several decimal digits of resolution is
2088 * acceptable. The J2000 and MJD methods are good compromises
2089 * between resolution and convenience. In the case of uta,utb, the
2090 * date &time method is best matched to the Earth rotation angle
2091 * algorithm used: maximum precision is delivered when the uta
2092 * argument is for 0hrs UT1 on the day in question and the utb
2093 * argument lies in the range 0 to 1, or vice versa.
2094 *
2095 * <li> The Celestial Intermediate Pole coordinates are the x,y
2096 * components of the unit vector in the Geocentric Celestial
2097 * Reference System.
2098 *
2099 * <li> The arguments xp and yp are the coordinates (in radians) of the
2100 * Celestial Intermediate Pole with respect to the International
2101 * Terrestrial Reference System (see IERS Conventions 2003),
2102 * measured along the meridians to 0 and 90 deg west respectively.
2103 *
2104 * <li> The matrix rc2t transforms from celestial to terrestrial
2105 * coordinates:
2106 *
2107 * [TRS] = RPOM * R_3(ERA) * RC2I * [CRS]
2108 *
2109 * = rc2t * [CRS]
2110 *
2111 * where [CRS] is a vector in the Geocentric Celestial Reference
2112 * System and [TRS] is a vector in the International Terrestrial
2113 * Reference System (see IERS Conventions 2003), ERA is the Earth
2114 * Rotation Angle and RPOM is the polar motion matrix.
2115 *
2116 * <li> Although its name does not include "00", This function is in fact
2117 * specific to the IAU 2000 models.
2118 *</ol>
2119 *<p>Called:<ul>
2120 * <li>{@link #jauC2ixy} celestial-to-intermediate matrix, given X,Y
2121 * <li>{@link #jauEra00} Earth rotation angle, IAU 2000
2122 * <li>{@link #jauSp00} the TIO locator s', IERS 2000
2123 * <li>{@link #jauPom00} polar motion matrix
2124 * <li>{@link #jauC2tcio} form CIO-based celestial-to-terrestrial matrix
2125 * </ul>
2126 * Reference:
2127 *
2128 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
2129 * IERS Technical Note No. 32, BKG (2004)
2130 *
2131 *@version 2009 April 1
2132 *
2133 * @since Release 20101201
2134 *
2135 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
2136 */
2137 public static double[][] jauC2txy(double tta, double ttb, double uta, double utb,
2138 double x, double y, double xp, double yp)
2139 {
2140 double rc2i[][] = new double[3][3], era, sp, rpom[][] = new double[3][3];
2141
2142
2143 /* Form the celestial-to-intermediate matrix for this TT. */
2144 rc2i = jauC2ixy(tta, ttb, x, y);
2145
2146 /* Predict the Earth rotation angle for this UT1. */
2147 era = jauEra00(uta, utb);
2148
2149 /* Estimate s'. */
2150 sp = jauSp00(tta, ttb);
2151
2152 /* Form the polar motion matrix. */
2153 rpom = jauPom00(xp, yp, sp);
2154
2155 /* Combine to form the celestial-to-terrestrial matrix. */
2156 double[][] rc2t = jauC2tcio(rc2i, era, rpom );
2157
2158 return rc2t;
2159
2160 }
2161
2162 /**
2163 * Gregorian Calendar to Julian Date.
2164 *
2165 *<p>This function is derived from the International Astronomical Union's
2166 * SOFA (Standards Of Fundamental Astronomy) software collection.
2167 *
2168 *<p>Status: support function.
2169 *
2170 *<!-- Given: -->
2171 * @param iy int year in Gregorian calendar (Note 1)
2172 * @param im int month in Gregorian calendar (Note 1)
2173 * @param id int day in Gregorian calendar (Note 1)
2174 *
2175 *<!-- Returned: -->
2176 * @return d MJD zero-point: always 2400000.5
2177 * <u>returned</u> Modified Julian Date for 0 hrs
2178 *
2179 * <!-- Returned (function value): -->
2180 * @throws JSOFAIllegalParameter status:
2181 * 0 = OK
2182 * -1 = bad year (Note 3: JD not computed)
2183 * -2 = bad month (JD not computed)
2184 * -3 = bad day (JD computed)
2185 *
2186 * <p>Notes:
2187 * <ol>
2188 *
2189 * <li> The algorithm used is valid from -4800 March 1, but this
2190 * implementation rejects dates before -4799 January 1.
2191 *
2192 * <li> The Julian Date is returned in two pieces, in the usual JSOFA
2193 * manner, which is designed to preserve time resolution. The
2194 * Julian Date is available as a single number by adding djm0 and
2195 * djm.
2196 *
2197 * <li> In early eras the conversion is from the "Proleptic Gregorian
2198 * Calendar"; no account is taken of the date(s) of adoption of
2199 * the Gregorian Calendar, nor is the AD/BC numbering convention
2200 * observed.
2201 *</ol>
2202 *<p>Reference:
2203 *
2204 * <p>Explanatory Supplement to the Astronomical Almanac,
2205 * P. Kenneth Seidelmann (ed), University Science Books (1992),
2206 * Section 12.92 (p604).
2207 *
2208 *@version 2009 October 19
2209 *
2210 * @since Release 20101201
2211 *
2212 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
2213 */
2214 public static JulianDate jauCal2jd(int iy, int im, int id) throws JSOFAIllegalParameter
2215 {
2216 int ly, my;
2217 long iypmy;
2218 double djm0, djm;
2219
2220 /* Earliest year allowed (4800BC) */
2221 final int IYMIN = -4799;
2222
2223 /* Month lengths in days */
2224 final int mtab[]
2225 = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
2226
2227
2228 /* Validate year and month. */
2229 if (iy < IYMIN) throw new JSOFAIllegalParameter("bad year", -1);
2230 if (im < 1 || im > 12) throw new JSOFAIllegalParameter("bad month", -2);
2231
2232 /* If February in a leap year, 1, otherwise 0. */
2233 ly = ((im == 2) &&(iy%4 == 0) && (iy%100 != 0 || (iy%400 == 0)))?1:0;
2234
2235 /* Validate day, taking into account leap years. */
2236 if ( (id < 1) || (id > (mtab[im-1] + ly))) {
2237 }
2238
2239 /* Return result. */
2240 my = (im - 14) / 12;
2241 iypmy = (long) (iy + my);
2242 djm0 = DJM0;
2243 djm = (double)((1461L * (iypmy + 4800L)) / 4L
2244 + (367L * (long) (im - 2 - 12 * my)) / 12L
2245 - (3L * ((iypmy + 4900L) / 100L)) / 4L
2246 + (long) id - 2432076L);
2247
2248 /* Return status. */
2249 return new JulianDate(djm0, djm);
2250
2251 }
2252
2253
2254 /**
2255 * Copy a p-vector.
2256 *
2257 *<p>This function is derived from the International Astronomical Union's
2258 * SOFA (Standards Of Fundamental Astronomy) software collection.
2259 *
2260 *<p>Status: vector/matrix support function.
2261 *
2262 *<!-- Given: -->
2263 * @param p double[3] p-vector to be copied
2264 *
2265 *<!-- Returned: -->
2266 * @param c double[3] <u>given and returned</u> copy
2267 * @return double[3] <u>given and returned</u> copy
2268 *
2269 *@version 2008 May 11
2270 *
2271 * @since Release 20101201
2272 *
2273 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
2274 */
2275 public static double[] jauCp(double p[], double c[])
2276 {
2277
2278 c[0] = p[0];
2279 c[1] = p[1];
2280 c[2] = p[2];
2281
2282 return c;
2283
2284 }
2285
2286
2287 /**
2288 * Copy a position/velocity vector.
2289 *
2290 *<p>This function is derived from the International Astronomical Union's
2291 * SOFA (Standards Of Fundamental Astronomy) software collection.
2292 *
2293 *<p>Status: vector/matrix support function.
2294 *
2295 *<!-- Given: -->
2296 * @param pv double[2][3] position/velocity vector to be copied
2297 * @param c double[2][3] <u>returned</u> copy
2298 *
2299 *<!-- Returned: -->
2300 * @return double[2][3] <u>returned c</u> copy
2301 *
2302 *<p>Called:<ul>
2303 * <li>{@link #jauCp} copy p-vector
2304 * </ul>
2305 *@version 2008 May 11
2306 *
2307 * @since Release 20101201
2308 *
2309 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
2310 */
2311 public static double[][] jauCpv(double pv[][], double c[][])
2312 {
2313
2314 c[0]=jauCp(pv[0], c[0]);
2315 c[1]=jauCp(pv[1], c[1]);
2316
2317 return c;
2318
2319 }
2320
2321
2322 /**
2323 * Copy an r-matrix.
2324 *
2325 *<p>This function is derived from the International Astronomical Union's
2326 * SOFA (Standards Of Fundamental Astronomy) software collection.
2327 *
2328 *<p>Status: vector/matrix support function.
2329 *
2330 *<!-- Given: -->
2331 * @param r double[3][3] r-matrix to be copied.
2332 *
2333 *<!-- Returned: -->
2334 * @param c double[3][3] <u>given and returned</u> the elements of r are copied into this.
2335 *
2336 *<p>Called:<ul>
2337 * <li>{@link #jauCp} copy p-vector
2338 * </ul>
2339 *@version 2008 May 11
2340 *
2341 * @since Release 20101201
2342 *
2343 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
2344 */
2345 public static void jauCr(double r[][], double c[][] )
2346 {
2347
2348 jauCp(r[0], c[0]);
2349 jauCp(r[1], c[1]);
2350 jauCp(r[2], c[2]);
2351
2352 return;
2353
2354 }
2355
2356
2357 /**
2358 * Decompose days to hours, minutes, seconds, fraction.
2359 *
2360 *<p>This function is derived from the International Astronomical Union's
2361 * SOFA (Standards Of Fundamental Astronomy) software collection.
2362 *
2363 *<p>Status: vector/matrix support function.
2364 *
2365 *<!-- Given: -->
2366 * @param ndp int resolution (Note 1)
2367 * @param days double interval in days
2368 *
2369 *<!-- Returned: -->
2370 * @param ihmsf int[4] <u>returned</u> hours, minutes, seconds, fraction
2371 * @return sign char <u>returned</u> '+' or '-'
2372 *
2373 * <p>Notes:
2374 * <ol>
2375 *
2376 * <li> The argument ndp is interpreted as follows:
2377 *
2378 * ndp resolution
2379 * : ...0000 00 00
2380 * -7 1000 00 00
2381 * -6 100 00 00
2382 * -5 10 00 00
2383 * -4 1 00 00
2384 * -3 0 10 00
2385 * -2 0 01 00
2386 * -1 0 00 10
2387 * 0 0 00 01
2388 * 1 0 00 00.1
2389 * 2 0 00 00.01
2390 * 3 0 00 00.001
2391 * : 0 00 00.000...
2392 *
2393 * <li> The largest positive useful value for ndp is determined by the
2394 * size of days, the format of double on the target platform, and
2395 * the risk of overflowing ihmsf[3]. On a typical platform, for
2396 * days up to 1.0, the available floating-point precision might
2397 * correspond to ndp=12. However, the practical limit is typically
2398 * ndp=9, set by the capacity of a 32-bit int, or ndp=4 if int is
2399 * only 16 bits.
2400 *
2401 * <li> The absolute value of days may exceed 1.0. In cases where it
2402 * does not, it is up to the caller to test for and handle the
2403 * case where days is very nearly 1.0 and rounds up to 24 hours,
2404 * by testing for ihms[0]=24 and setting ihmsf[0-3] to zero.
2405 *</ol>
2406 *@version 2008 May 11
2407 *
2408 * @since Release 20101201
2409 *
2410 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
2411 */
2412 public static char jauD2tf(final int ndp, final double days, int ihmsf[])
2413 {
2414 int nrs, n;
2415 double rs, rm, rh, a, w, ah, am, as, af;
2416
2417
2418 /* Handle sign. */
2419 char sign = (char) ( ( days >= 0.0 ) ? '+' : '-' );
2420
2421 /* Interval in seconds. */
2422 a = DAYSEC * abs(days);
2423
2424 /* Pre-round if resolution coarser than 1s (then pretend ndp=1). */
2425 if (ndp < 0) {
2426 nrs = 1;
2427 for (n = 1; n <= -ndp; n++) {
2428 nrs *= (n == 2 || n == 4) ? 6 : 10;
2429 }
2430 rs = (double) nrs;
2431 w = a / rs;
2432 a = rs * dnint(w);
2433 }
2434
2435 /* Express the unit of each field in resolution units. */
2436 nrs = 1;
2437 for (n = 1; n <= ndp; n++) {
2438 nrs *= 10;
2439 }
2440 rs = (double) nrs;
2441 rm = rs * 60.0;
2442 rh = rm * 60.0;
2443
2444 /* Round the interval and express in resolution units. */
2445 a = dnint(rs * a);
2446
2447 /* Break into fields. */
2448 ah = a / rh;
2449 ah = dint(ah);
2450 a -= ah * rh;
2451 am = a / rm;
2452 am = dint(am);
2453 a -= am * rm;
2454 as = a / rs;
2455 as = dint(as);
2456 af = a - as * rs;
2457
2458 /* Return results. */
2459 ihmsf[0] = (int) ah;
2460 ihmsf[1] = (int) am;
2461 ihmsf[2] = (int) as;
2462 ihmsf[3] = (int) af;
2463
2464 return sign;
2465
2466 }
2467
2468 /**
2469 * Representation of Gregorian Calendar with fractional day.
2470 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
2471 *
2472 * @since AIDA Stage 1
2473 */
2474 public static class Calendar {
2475 public final int iy;
2476 public final int im;
2477 public final int id;
2478 public final double fd;
2479 public Calendar (int iy, int im, int id, double fd)
2480 {
2481 this.iy = iy;
2482 this.im = im;
2483 this.id = id;
2484 this.fd = fd;
2485 }
2486 }
2487
2488 /**
2489 * Representation of Gregorian Calendar with integer hours minutes and seconds.
2490 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
2491 *
2492 * @since AIDA Stage 1
2493 */
2494 public static class CalendarHMS {
2495 public final int iy;
2496 public final int im;
2497 public final int id;
2498 public final int ihmsf[];
2499 public CalendarHMS (int iy, int im, int id, int hmsf[]){
2500 this.iy = iy;
2501 this.im = im;
2502 this.id = id;
2503 this.ihmsf = hmsf;
2504 }
2505 }
2506
2507 /**
2508 *
2509 * Format for output a 2-part Julian Date (or in the case of UTC a
2510 * quasi-JD form that includes special provision for leap seconds).
2511 *
2512 *<p>This function is derived from the International Astronomical Union's
2513 * SOFA (Standards of Fundamental Astronomy) software collection.
2514 *
2515 *<p>Status: support function.
2516 *
2517 *<!-- Given: -->
2518 * @param scale char[] time scale ID (Note 1)
2519 * @param ndp int resolution (Note 2)
2520 * @param d1 double time as a 2-part Julian Date (Notes 3,4)
2521 * @param d2 double time as a 2-part Julian Date (Notes 3,4)
2522 *
2523 *<!-- Returned:-->
2524 * @return the date as a Gregorian calendar
2525 * iy,im,id int year, month, day in Gregorian calendar (Note 5)
2526 * ihmsf int[4] hours, minutes, seconds, fraction (Note 1)
2527 *
2528 * Returned (function value):
2529 * int status: +1 = dubious year (Note 5)
2530 * 0 = OK
2531 * -1 = unacceptable date (Note 6)
2532 *
2533 *<p>Notes:
2534 *<ol>
2535 * <li> scale identifies the time scale. Only the value "UTC" (in upper
2536 * case) is significant, and enables handling of leap seconds (see
2537 * Note 4).
2538 *
2539 * <li> ndp is the number of decimal places in the seconds field, and can
2540 * have negative as well as positive values, such as:
2541 *
2542 * ndp resolution
2543 * -4 1 00 00
2544 * -3 0 10 00
2545 * -2 0 01 00
2546 * -1 0 00 10
2547 * 0 0 00 01
2548 * 1 0 00 00.1
2549 * 2 0 00 00.01
2550 * 3 0 00 00.001
2551 *
2552 * The limits are platform dependent, but a safe range is -5 to +9.
2553 *
2554 * <li> d1+d2 is Julian Date, apportioned in any convenient way between
2555 * the two arguments, for example where d1 is the Julian Day Number
2556 * and d2 is the fraction of a day. In the case of UTC, where the
2557 * use of JD is problematical, special conventions apply: see the
2558 * next note.
2559 *
2560 * <li> JD cannot unambiguously represent UTC during a leap second unless
2561 * special measures are taken. The SOFA internal convention is that
2562 * the quasi-JD day represents UTC days whether the length is 86399,
2563 * 86400 or 86401 SI seconds. In the 1960-1972 era there were
2564 * smaller jumps (in either direction) each time the linear UTC(TAI)
2565 * expression was changed, and these "mini-leaps" are also included
2566 * in the SOFA convention.
2567 *
2568 * <li> The warning status "dubious year" flags UTCs that predate the
2569 * introduction of the time scale or that are too far in the future
2570 * to be trusted. See iauDat for further details.
2571 *
2572 * <li> For calendar conventions and limitations, see iauCal2jd.
2573 *</ol>
2574 * Called:
2575 * iauJd2cal JD to Gregorian calendar
2576 * iauD2tf decompose days to hms
2577 * iauDat delta(AT) = TAI-UTC
2578 *
2579 *@version 2014 February 15
2580 *
2581 *@since JSOFA release 20131202
2582 *
2583 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
2584 * @throws JSOFAInternalError an internal error has occured
2585 * @throws JSOFAIllegalParameter
2586 */
2587 public static CalendarHMS jauD2dtf(final String scale, int ndp, double d1, double d2 ) throws JSOFAIllegalParameter, JSOFAInternalError
2588 {
2589 boolean leap;
2590 int iy1, im1, id1, iy2, im2, id2, ihmsf1[] = new int[4];
2591 double a1, b1, fd, dat0, dat12, dat24, dleap;
2592
2593
2594 /* The two-part JD. */
2595 a1 = d1;
2596 b1 = d2;
2597
2598 /* Provisional calendar date. */
2599 Calendar cal = jauJd2cal(a1, b1);
2600 iy1 = cal.iy;
2601 im1 = cal.im;
2602 id1 = cal.id;
2603 fd = cal.fd;
2604
2605 /* Is this a leap second day? */
2606 leap = false;
2607 if ( scale.equalsIgnoreCase("UTC") ) {
2608
2609 /* TAI-UTC at 0h today. */
2610 dat0 = jauDat(iy1, im1, id1, 0.0 );
2611
2612 /* TAI-UTC at 12h today (to detect drift). */
2613 dat12 = jauDat(iy1, im1, id1, 0.5);
2614
2615 /* TAI-UTC at 0h tomorrow (to detect jumps). */
2616 cal = jauJd2cal(a1+1.5, b1-fd);
2617 iy2 = cal.iy;
2618 im2 = cal.im;
2619 id2 = cal.id;
2620 dat24 = jauDat(iy2, im2, id2, 0.0);
2621
2622 /* Any sudden change in TAI-UTC (seconds). */
2623 dleap = dat24 - (2.0*dat12 - dat0);
2624
2625 /* If leap second day, scale the fraction of a day into SI. */
2626 leap = (dleap != 0.0);
2627 if (leap) fd += fd * dleap/DAYSEC;
2628 }
2629
2630 jauD2tf ( ndp, fd, ihmsf1 );
2631
2632 /* Has the (rounded) time gone past 24h? */
2633 if ( ihmsf1[0] > 23 ) {
2634
2635 /* Yes. We probably need tomorrow's calendar date. */
2636 cal = jauJd2cal(a1+1.5, b1-fd);
2637 iy2 = cal.iy; im2 = cal.im; id2 = cal.id;
2638
2639 /* Is today a leap second day? */
2640 if ( ! leap ) {
2641
2642 /* No. Use 0h tomorrow. */
2643 iy1 = iy2;
2644 im1 = im2;
2645 id1 = id2;
2646 ihmsf1[0] = 0;
2647 ihmsf1[1] = 0;
2648 ihmsf1[2] = 0;
2649
2650 } else {
2651
2652 /* Yes. Are we past the leap second itself? */
2653 if ( ihmsf1[2] > 0 ) {
2654
2655 /* Yes. Use tomorrow but allow for the leap second. */
2656 iy1 = iy2;
2657 im1 = im2;
2658 id1 = id2;
2659 ihmsf1[0] = 0;
2660 ihmsf1[1] = 0;
2661 ihmsf1[2] = 0;
2662
2663 } else {
2664
2665 /* No. Use 23 59 60... today. */
2666 ihmsf1[0] = 23;
2667 ihmsf1[1] = 59;
2668 ihmsf1[2] = 60;
2669 }
2670
2671 /* If rounding to 10s or coarser always go up to new day. */
2672 if ( ndp < 0 && ihmsf1[2] == 60 ) {
2673 iy1 = iy2;
2674 im1 = im2;
2675 id1 = id2;
2676 ihmsf1[0] = 0;
2677 ihmsf1[1] = 0;
2678 ihmsf1[2] = 0;
2679 }
2680 }
2681 }
2682
2683 /* Results. */
2684
2685 return new CalendarHMS(iy1, im1, id1, ihmsf1);
2686
2687 }
2688
2689 /**
2690 * Encode date and time fields into 2-part Julian Date (or in the case
2691 * of UTC a quasi-JD form that includes special provision for leap
2692 * seconds).
2693 *
2694 *<p>This function is derived from the International Astronomical Union's
2695 * SOFA (Standards of Fundamental Astronomy) software collection.
2696 *
2697 * <p>Status: support function.
2698 *
2699 * <!-- Given: -->
2700 * @param scale char time scale ID (Note 1)
2701 * @param iy int year in Gregorian calendar (Note 2)
2702 * @param im int month in Gregorian calendar (Note 2)
2703 * @param id int day in Gregorian calendar (Note 2)
2704 * @param ihr int hour
2705 * @param imn int minute
2706 * @param sec double seconds
2707 *
2708 * <!-- Returned: -->
2709 * @return 2-part Julian Date (Notes 3,4)
2710 *
2711 * @throws JSOFAIllegalParameter
2712 *
2713 * @throws JSOFAInternalError {@code status: +3 = both of next two
2714 * +2 = time is after end of day (Note 5)
2715 * +1 = dubious year (Note 6)
2716 * 0 = OK
2717 * -1 = bad year
2718 * -2 = bad month
2719 * -3 = bad day
2720 * -4 = bad hour
2721 * -5 = bad minute
2722 * -6 = bad second (<0)}
2723 *
2724 *<p>Notes:
2725 *<ol>
2726 * <li> scale identifies the time scale. Only the value "UTC" (in upper
2727 * case) is significant, and enables handling of leap seconds (see
2728 * Note 4).
2729 *
2730 * <li> For calendar conventions and limitations, see iauCal2jd.
2731 *
2732 * <li> The sum of the results, d1+d2, is Julian Date, where normally d1
2733 * is the Julian Day Number and d2 is the fraction of a day. In the
2734 * case of UTC, where the use of JD is problematical, special
2735 * conventions apply: see the next note.
2736 *
2737 * <li> JD cannot unambiguously represent UTC during a leap second unless
2738 * special measures are taken. The SOFA internal convention is that
2739 * the quasi-JD day represents UTC days whether the length is 86399,
2740 * 86400 or 86401 SI seconds. In the 1960-1972 era there were
2741 * smaller jumps (in either direction) each time the linear UTC(TAI)
2742 * expression was changed, and these "mini-leaps" are also included
2743 * in the SOFA convention.
2744 *
2745 * <li> The warning status "time is after end of day" usually means that
2746 * the sec argument is greater than 60.0. However, in a day ending
2747 * in a leap second the limit changes to 61.0 (or 59.0 in the case
2748 * of a negative leap second).
2749 *
2750 * <li> The warning status "dubious year" flags UTCs that predate the
2751 * introduction of the time scale or that are too far in the future
2752 * to be trusted. See iauDat for further details.
2753 *
2754 * <li> Only in the case of continuous and regular time scales (TAI, TT,
2755 * TCG, TCB and TDB) is the result d1+d2 a Julian Date, strictly
2756 * speaking. In the other cases (UT1 and UTC) the result must be
2757 * used with circumspection; in particular the difference between
2758 * two such results cannot be interpreted as a precise time
2759 * interval.
2760 *</ol>
2761 * Called:
2762 * iauCal2jd Gregorian calendar to JD
2763 * iauDat delta(AT) = TAI-UTC
2764 * iauJd2cal JD to Gregorian calendar
2765 *
2766 *@version 2013 July 26
2767 *
2768 *@since JSOFA release 20131202
2769 *
2770 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
2771 */
2772 public static JulianDate jauDtf2d(final String scale, int iy, int im, int id,
2773 int ihr, int imn, double sec) throws JSOFAIllegalParameter, JSOFAInternalError
2774 {
2775 int js = 0, iy2, im2, id2;
2776 double dj, w, day, seclim, dat0, dat12, dat24, dleap, time;
2777
2778
2779 /* Today's Julian Day Number. */
2780 JulianDate jd = jauCal2jd(iy, im, id);
2781 dj = jd.djm0; w = jd.djm1;
2782 dj += w;
2783
2784 /* Day length and final minute length in seconds (provisional). */
2785 day = DAYSEC;
2786 seclim = 60.0;
2787
2788 /* Deal with the UTC leap second case. */
2789 if ( scale.equals("UTC") ) {
2790
2791 /* TAI-UTC at 0h today. */
2792 dat0 = jauDat(iy, im, id, 0.0);
2793
2794 /* TAI-UTC at 12h today (to detect drift). */
2795 dat12 = jauDat(iy, im, id, 0.5);
2796
2797 /* TAI-UTC at 0h tomorrow (to detect jumps). */
2798 Calendar cal = jauJd2cal ( dj, 1.5);
2799 iy2 = cal.iy; im2 = cal.im; id2 = cal.id; w = cal.fd;
2800
2801 dat24 = jauDat(iy2, im2, id2, 0.0);
2802
2803 /* Any sudden change in TAI-UTC between today and tomorrow. */
2804 dleap = dat24 - (2.0*dat12 - dat0);
2805
2806 /* If leap second day, correct the day and final minute lengths. */
2807 day += dleap;
2808 if ( ihr == 23 && imn == 59 ) seclim += dleap;
2809
2810 /* End of UTC-specific actions. */
2811 }
2812
2813 /* Validate the time. */
2814 if ( ihr >= 0 && ihr <= 23 ) {
2815 if ( imn >= 0 && imn <= 59 ) {
2816 if ( sec >= 0 ) {
2817 if ( sec >= seclim ) {
2818 js += 2;
2819 }
2820 } else {
2821 js = -6;
2822 }
2823 } else {
2824 js = -5;
2825 }
2826 } else {
2827 js = -4;
2828 }
2829 if ( js < 0 ) throw new JSOFAInternalError("problem with time", js);
2830
2831 /* The time in days. */
2832 time = ( 60.0 * ( (double) ( 60 * ihr + imn ) ) + sec ) / day;
2833
2834 /* Return the date and time. */
2835 return new JulianDate(dj, time) ;
2836
2837 }
2838
2839 /**
2840 * the date of the last leap second. Note that this is not a SOFA standard fumction.
2841 * @return the {@link JulianDate} of the last leap second.
2842 */
2843 public static JulianDate lastLeapSecondDate()
2844 {
2845 final LeapInfo lastentry = leapSeconds[leapSeconds.length -1];
2846 JulianDate retval = new JulianDate(0, 0);
2847 try {
2848 retval = jauCal2jd(lastentry.iyear,lastentry.month,1);
2849 } catch (JSOFAIllegalParameter e) {
2850 //should not happen
2851 e.printStackTrace();
2852 }
2853 return retval;
2854
2855 }
2856
2857
2858 /**
2859 * For a given UTC date, calculate delta(AT) = TAI-UTC.
2860 *<pre>
2861 * :------------------------------------------:
2862 * : :
2863 * : IMPORTANT :
2864 * : :
2865 * : A new version of this function must be :
2866 * : produced whenever a new leap second is :
2867 * : announced. There are four items to :
2868 * : change on each such occasion: :
2869 * : :
2870 * : 1) A new line must be added to the set :
2871 * : of statements that initialize the :
2872 * : array "changes". :
2873 * : :
2874 * : 2) The parameter IYV must be set to :
2875 * : the current year. :
2876 * : :
2877 * : 3) The "Latest leap second" comment :
2878 * : below must be set to the new leap :
2879 * : second date. :
2880 * : :
2881 * : 4) The "This revision" comment, later, :
2882 * : must be set to the current date. :
2883 * : :
2884 * : Change (2) must also be carried out :
2885 * : whenever the function is re-issued, :
2886 * : even if no leap seconds have been :
2887 * : added. :
2888 * : :
2889 * : Latest leap second: 2017 Jan 01 :
2890 * : :
2891 * :__________________________________________:
2892 *</pre>
2893 *<p>This function is derived from the International Astronomical Union's
2894 * SOFA (Standards Of Fundamental Astronomy) software collection.
2895 *
2896 *<p>Status: support function.
2897 *
2898 *<!-- Given: -->
2899 * @param iy int UTC: year (Notes 1 and 2)
2900 * @param im int month (Note 2)
2901 * @param id int day (Notes 2 and 3)
2902 * @param fd double fraction of day (Note 4)
2903 *
2904 *<!-- Returned: -->
2905 * @return deltat double <u>returned</u> TAI minus UTC, seconds
2906 *
2907 * @throws JSOFAIllegalParameter status (Note 5):
2908 * 1 = dubious year (Note 1)
2909 * 0 = OK
2910 * -1 = bad year
2911 * -2 = bad month
2912 * -3 = bad day (Note 3)
2913 * -4 = bad fraction (Note 4)
2914 *
2915 * <p>Notes:
2916 * <ol>
2917 *
2918 * <li> UTC began at 1960 January 1.0 (JD 2436934.5) and it is improper
2919 * to call the function with an earlier date. If this is attempted,
2920 * zero is returned together with a warning status.
2921 *
2922 * Because leap seconds cannot, in principle, be predicted in
2923 * advance, a reliable check for dates beyond the valid range is
2924 * impossible. To guard against gross errors, a year five or more
2925 * after the release year of the present function (see parameter
2926 * IYV) is considered dubious. In this case a warning status is
2927 * returned but the result is computed in the normal way.
2928 *
2929 * For both too-early and too-late years, the warning status is
2930 * j=+1. This is distinct from the error status j=-1, which
2931 * signifies a year so early that JD could not be computed.
2932 *
2933 * <li> If the specified date is for a day which ends with a leap second,
2934 * the TAI-UTC value returned is for the period leading up to the
2935 * leap second. If the date is for a day which begins as a leap
2936 * second ends, the TAI-UTC returned is for the period following the
2937 * leap second.
2938 *
2939 * <li> The day number must be in the normal calendar range, for example
2940 * 1 through 30 for April. The "almanac" convention of allowing
2941 * such dates as January 0 and December 32 is not supported in this
2942 * function, in order to avoid confusion near leap seconds.
2943 *
2944 * <li> The fraction of day is used only for dates before the
2945 * introduction of leap seconds, the first of which occurred at the
2946 * end of 1971. It is tested for validity (zero to less than 1 is
2947 * the valid range) even if not used; if invalid, zero is used and
2948 * status j=-4 is returned. For many applications, setting fd to
2949 * zero is acceptable; the resulting error is always less than 3 ms
2950 * (and occurs only pre-1972).
2951 *
2952 * <li> The status value returned in the case where there are multiple
2953 * errors refers to the first error detected. For example, if the
2954 * month and day are 13 and 32 respectively, j=-2 (bad month)
2955 * will be returned.
2956 *
2957 * <li> In cases where a valid result is not available, zero is returned.
2958 *
2959 *<p>References:
2960 *
2961 * <li> For dates from 1961 January 1 onwards, the expressions from the
2962 * file ftp://maia.usno.navy.mil/ser7/tai-utc.dat are used.
2963 *
2964 * <li> The 5ms timestep at 1961 January 1 is taken from 2.58.1 (p87) of
2965 * the 1992 Explanatory Supplement.
2966 *</ol>
2967 *<p>Called:<ul>
2968 * <li>{@link #jauCal2jd} Gregorian calendar to Julian Day number
2969 * </ul>
2970 *<p>@version 20160729
2971 *
2972 * @since Release 20101201
2973 *
2974 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
2975 */
2976 public static double jauDat(int iy, int im, int id, double fd ) throws JSOFAIllegalParameter, JSOFAInternalError
2977 {
2978
2979 /* Reference dates (MJD) and drift rates (s/day), pre leap seconds */
2980 final double drift[][] = {
2981 { 37300.0, 0.0012960 },
2982 { 37300.0, 0.0012960 },
2983 { 37300.0, 0.0012960 },
2984 { 37665.0, 0.0011232 },
2985 { 37665.0, 0.0011232 },
2986 { 38761.0, 0.0012960 },
2987 { 38761.0, 0.0012960 },
2988 { 38761.0, 0.0012960 },
2989 { 38761.0, 0.0012960 },
2990 { 38761.0, 0.0012960 },
2991 { 38761.0, 0.0012960 },
2992 { 38761.0, 0.0012960 },
2993 { 39126.0, 0.0025920 },
2994 { 39126.0, 0.0025920 }
2995 };
2996
2997 /* Number of Delta(AT) expressions before leap seconds were introduced */
2998 final int NERA1 = drift.length;
2999
3000
3001 /* Number of Delta(AT) changes */
3002 final int NDAT = leapSeconds.length;
3003
3004 /* Miscellaneous local variables */
3005 int i, m;
3006 double da, djm;
3007
3008
3009 /* Initialize the result to zero. */
3010 double deltat = da = 0.0;
3011
3012 /* If invalid fraction of a day, set error status and give up. */
3013 if (fd < 0.0 || fd > 1.0) throw new JSOFAIllegalParameter("bad day fraction", -4);
3014
3015 /* Convert the date into an MJD. */
3016 JulianDate jd = jauCal2jd(iy, im, id);
3017 djm = jd.djm1;
3018
3019 /* If pre-UTC year, set warning status and give up. */
3020 if (iy < leapSeconds[0].iyear) throw new JSOFAInternalError("year before UTC start", 1);
3021
3022 /* If suspiciously late year, set warning status but proceed. */
3023 if (iy > IYV + 5) {
3024 }
3025
3026 /* Combine year and month to form a date-ordered integer... */
3027 m = 12*iy + im;
3028
3029 /* ...and use it to find the preceding table entry. */
3030 for (i = NDAT-1; i >=0; i--) {
3031 if (m >= (12 * leapSeconds[i].iyear + leapSeconds[i].month)) break;
3032 }
3033
3034 /* Get the Delta(AT). */
3035 da = leapSeconds[i].delat;
3036
3037 /* If pre-1972, adjust for drift. */
3038 if (i < NERA1) da += (djm + fd - drift[i][0]) * drift[i][1];
3039
3040 /* Return the Delta(AT) value. */
3041 deltat = da;
3042
3043 /* Return the value. */
3044 return deltat;
3045
3046 }
3047
3048
3049 /**
3050 * An approximation to TDB-TT, the difference between barycentric
3051 * dynamical time and terrestrial time, for an observer on the Earth.
3052 *
3053 * The different time scales - proper, coordinate and realized - are
3054 * related to each other:
3055 * {@code
3056 * TAI <- physically realized
3057 * :
3058 * offset <- observed (nominally +32.184s)
3059 * :
3060 * TT <- terrestrial time
3061 * :
3062 * rate adjustment (L_G) <- definition of TT
3063 * :
3064 * TCG <- time scale for GCRS
3065 * :
3066 * "periodic" terms <- jauDtdb is an implementation
3067 * :
3068 * rate adjustment (L_C) <- function of solar-system ephemeris
3069 * :
3070 * TCB <- time scale for BCRS
3071 * :
3072 * rate adjustment (-L_B) <- definition of TDB
3073 * :
3074 * TDB <- TCB scaled to track TT
3075 * :
3076 * "periodic" terms <- -jau_DTDB is an approximation
3077 * :
3078 * TT <- terrestrial time
3079 *}
3080 * Adopted values for the various constants can be found in the IERS
3081 * Conventions (McCarthy & Petit 2003).
3082 *
3083 *<p>This function is derived from the International Astronomical Union's
3084 * SOFA (Standards Of Fundamental Astronomy) software collection.
3085 *
3086 *<p>Status: canonical model.
3087 *
3088 *<!-- Given: -->
3089 * @param date1 double date, TDB (Notes 1-3)
3090 * @param date2 double date, TDB (Notes 1-3)
3091 * @param ut double universal time (UT1, fraction of one day)
3092 * @param elong double longitude (east positive, radians)
3093 * @param u double distance from Earth spin axis (km)
3094 * @param v double distance north of equatorial plane (km)
3095 *
3096 * <!-- Returned (function value): -->
3097 * @return double TDB-TT (seconds)
3098 *
3099 * <p>Notes:
3100 * <ol>
3101 *
3102 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
3103 * convenient way between the two arguments. For example,
3104 * JD(TT)=2450123.7 could be expressed in any of these ways,
3105 * among others:
3106 *<pre>
3107 * date1 date2
3108 *
3109 * 2450123.7 0.0 (JD method)
3110 * 2451545.0 -1421.3 (J2000 method)
3111 * 2400000.5 50123.2 (MJD method)
3112 * 2450123.5 0.2 (date & time method)
3113 *</pre>
3114 * The JD method is the most natural and convenient to use in
3115 * cases where the loss of several decimal digits of resolution
3116 * is acceptable. The J2000 method is best matched to the way
3117 * the argument is handled internally and will deliver the
3118 * optimum resolution. The MJD method and the date & time methods
3119 * are both good compromises between resolution and convenience.
3120 *
3121 * Although the date is, formally, barycentric dynamical time (TDB),
3122 * the terrestrial dynamical time (TT) can be used with no practical
3123 * effect on the accuracy of the prediction.
3124 *
3125 * <li> TT can be regarded as a coordinate time that is realized as an
3126 * offset of 32.184s from International Atomic Time, TAI. TT is a
3127 * specific linear transformation of geocentric coordinate time TCG,
3128 * which is the time scale for the Geocentric Celestial Reference
3129 * System, GCRS.
3130 *
3131 * <li> TDB is a coordinate time, and is a specific linear transformation
3132 * of barycentric coordinate time TCB, which is the time scale for
3133 * the Barycentric Celestial Reference System, BCRS.
3134 *
3135 * <li> The difference TCG-TCB depends on the masses and positions of the
3136 * bodies of the solar system and the velocity of the Earth. It is
3137 * dominated by a rate difference, the residual being of a periodic
3138 * character. The latter, which is modeled by the present function,
3139 * comprises a main (annual) sinusoidal term of amplitude
3140 * approximately 0.00166 seconds, plus planetary terms up to about
3141 * 20 microseconds, and lunar and diurnal terms up to 2 microseconds.
3142 * These effects come from the changing transverse Doppler effect
3143 * and gravitational red-shift as the observer (on the Earth's
3144 * surface) experiences variations in speed (with respect to the
3145 * BCRS) and gravitational potential.
3146 *
3147 * <li> TDB can be regarded as the same as TCB but with a rate adjustment
3148 * to keep it close to TT, which is convenient for many applications.
3149 * The history of successive attempts to define TDB is set out in
3150 * Resolution 3 adopted by the IAU General Assembly in 2006, which
3151 * defines a fixed TDB(TCB) transformation that is consistent with
3152 * contemporary solar-system ephemerides. Future ephemerides will
3153 * imply slightly changed transformations between TCG and TCB, which
3154 * could introduce a linear drift between TDB and TT; however, any
3155 * such drift is unlikely to exceed 1 nanosecond per century.
3156 *
3157 * <li> The geocentric TDB-TT model used in the present function is that of
3158 * Fairhead & Bretagnon (1990), in its full form. It was originally
3159 * supplied by Fairhead (private communications with P.T.Wallace,
3160 * 1990) as a Fortran subroutine. The present C function contains an
3161 * adaptation of the Fairhead code. The numerical results are
3162 * essentially unaffected by the changes, the differences with
3163 * respect to the Fairhead & Bretagnon original being at the 1e-20 s
3164 * level.
3165 *
3166 * The topocentric part of the model is from Moyer (1981) and
3167 * Murray (1983), with fundamental arguments adapted from
3168 * Simon et al. 1994. It is an approximation to the expression
3169 * ( v / c ) . ( r / c ), where v is the barycentric velocity of
3170 * the Earth, r is the geocentric position of the observer and
3171 * c is the speed of light.
3172 *
3173 * By supplying zeroes for u and v, the topocentric part of the
3174 * model can be nullified, and the function will return the Fairhead
3175 * & Bretagnon result alone.
3176 *
3177 * <li> During the interval 1950-2050, the absolute accuracy is better
3178 * than +/- 3 nanoseconds relative to time ephemerides obtained by
3179 * direct numerical integrations based on the JPL DE405 solar system
3180 * ephemeris.
3181 *
3182 * <li> It must be stressed that the present function is merely a model,
3183 * and that numerical integration of solar-system ephemerides is the
3184 * definitive method for predicting the relationship between TCG and
3185 * TCB and hence between TT and TDB.
3186 *</ol>
3187 *<p>References:
3188 *
3189 * <p>Fairhead, L., & Bretagnon, P., Astron.Astrophys., 229, 240-247
3190 * (1990).
3191 *
3192 * <p>IAU 2006 Resolution 3.
3193 *
3194 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
3195 * IERS Technical Note No. 32, BKG (2004)
3196 *
3197 * <p>Moyer, T.D., Cel.Mech., 23, 33 (1981).
3198 *
3199 * <p>Murray, C.A., Vectorial Astrometry, Adam Hilger (1983).
3200 *
3201 * <p>Seidelmann, P.K. et al., Explanatory Supplement to the
3202 * Astronomical Almanac, Chapter 2, University Science Books (1992).
3203 *
3204 * <p>Simon, J.L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
3205 * Francou, G. & Laskar, J., Astron.Astrophys., 282, 663-683 (1994).
3206 *
3207 *@version 2009 December 17
3208 *
3209 * @since Release 20101201
3210 *
3211 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
3212 */
3213 public static double jauDtdb(double date1, double date2,
3214 double ut, double elong, double u, double v)
3215 {
3216 double t, tsol, w, elsun, emsun, d, elj, els, wt, w0, w1, w2, w3, w4,
3217 wf, wj;
3218 int j;
3219
3220 /*
3221 * =====================
3222 * Fairhead et al. model
3223 * =====================
3224 *
3225 * 787 sets of three coefficients.
3226 *
3227 * Each set is
3228 * amplitude (microseconds)
3229 * frequency (radians per Julian millennium since J2000.0)
3230 * phase (radians)
3231 *
3232 * Sets 1-474 are the T**0 terms
3233 * " 475-679 " " T**1
3234 * " 680-764 " " T**2
3235 * " 765-784 " " T**3
3236 * " 785-787 " " T**4
3237 */
3238
3239 final double fairhd[][] = {
3240 /* 1, 10 */
3241 { 1656.674564e-6, 6283.075849991, 6.240054195 },
3242 { 22.417471e-6, 5753.384884897, 4.296977442 },
3243 { 13.839792e-6, 12566.151699983, 6.196904410 },
3244 { 4.770086e-6, 529.690965095, 0.444401603 },
3245 { 4.676740e-6, 6069.776754553, 4.021195093 },
3246 { 2.256707e-6, 213.299095438, 5.543113262 },
3247 { 1.694205e-6, -3.523118349, 5.025132748 },
3248 { 1.554905e-6, 77713.771467920, 5.198467090 },
3249 { 1.276839e-6, 7860.419392439, 5.988822341 },
3250 { 1.193379e-6, 5223.693919802, 3.649823730 },
3251 /* 11, 20 */
3252 { 1.115322e-6, 3930.209696220, 1.422745069 },
3253 { 0.794185e-6, 11506.769769794, 2.322313077 },
3254 { 0.447061e-6, 26.298319800, 3.615796498 },
3255 { 0.435206e-6, -398.149003408, 4.349338347 },
3256 { 0.600309e-6, 1577.343542448, 2.678271909 },
3257 { 0.496817e-6, 6208.294251424, 5.696701824 },
3258 { 0.486306e-6, 5884.926846583, 0.520007179 },
3259 { 0.432392e-6, 74.781598567, 2.435898309 },
3260 { 0.468597e-6, 6244.942814354, 5.866398759 },
3261 { 0.375510e-6, 5507.553238667, 4.103476804 },
3262 /* 21, 30 */
3263 { 0.243085e-6, -775.522611324, 3.651837925 },
3264 { 0.173435e-6, 18849.227549974, 6.153743485 },
3265 { 0.230685e-6, 5856.477659115, 4.773852582 },
3266 { 0.203747e-6, 12036.460734888, 4.333987818 },
3267 { 0.143935e-6, -796.298006816, 5.957517795 },
3268 { 0.159080e-6, 10977.078804699, 1.890075226 },
3269 { 0.119979e-6, 38.133035638, 4.551585768 },
3270 { 0.118971e-6, 5486.777843175, 1.914547226 },
3271 { 0.116120e-6, 1059.381930189, 0.873504123 },
3272 { 0.137927e-6, 11790.629088659, 1.135934669 },
3273 /* 31, 40 */
3274 { 0.098358e-6, 2544.314419883, 0.092793886 },
3275 { 0.101868e-6, -5573.142801634, 5.984503847 },
3276 { 0.080164e-6, 206.185548437, 2.095377709 },
3277 { 0.079645e-6, 4694.002954708, 2.949233637 },
3278 { 0.062617e-6, 20.775395492, 2.654394814 },
3279 { 0.075019e-6, 2942.463423292, 4.980931759 },
3280 { 0.064397e-6, 5746.271337896, 1.280308748 },
3281 { 0.063814e-6, 5760.498431898, 4.167901731 },
3282 { 0.048042e-6, 2146.165416475, 1.495846011 },
3283 { 0.048373e-6, 155.420399434, 2.251573730 },
3284 /* 41, 50 */
3285 { 0.058844e-6, 426.598190876, 4.839650148 },
3286 { 0.046551e-6, -0.980321068, 0.921573539 },
3287 { 0.054139e-6, 17260.154654690, 3.411091093 },
3288 { 0.042411e-6, 6275.962302991, 2.869567043 },
3289 { 0.040184e-6, -7.113547001, 3.565975565 },
3290 { 0.036564e-6, 5088.628839767, 3.324679049 },
3291 { 0.040759e-6, 12352.852604545, 3.981496998 },
3292 { 0.036507e-6, 801.820931124, 6.248866009 },
3293 { 0.036955e-6, 3154.687084896, 5.071801441 },
3294 { 0.042732e-6, 632.783739313, 5.720622217 },
3295 /* 51, 60 */
3296 { 0.042560e-6, 161000.685737473, 1.270837679 },
3297 { 0.040480e-6, 15720.838784878, 2.546610123 },
3298 { 0.028244e-6, -6286.598968340, 5.069663519 },
3299 { 0.033477e-6, 6062.663207553, 4.144987272 },
3300 { 0.034867e-6, 522.577418094, 5.210064075 },
3301 { 0.032438e-6, 6076.890301554, 0.749317412 },
3302 { 0.030215e-6, 7084.896781115, 3.389610345 },
3303 { 0.029247e-6, -71430.695617928, 4.183178762 },
3304 { 0.033529e-6, 9437.762934887, 2.404714239 },
3305 { 0.032423e-6, 8827.390269875, 5.541473556 },
3306 /* 61, 70 */
3307 { 0.027567e-6, 6279.552731642, 5.040846034 },
3308 { 0.029862e-6, 12139.553509107, 1.770181024 },
3309 { 0.022509e-6, 10447.387839604, 1.460726241 },
3310 { 0.020937e-6, 8429.241266467, 0.652303414 },
3311 { 0.020322e-6, 419.484643875, 3.735430632 },
3312 { 0.024816e-6, -1194.447010225, 1.087136918 },
3313 { 0.025196e-6, 1748.016413067, 2.901883301 },
3314 { 0.021691e-6, 14143.495242431, 5.952658009 },
3315 { 0.017673e-6, 6812.766815086, 3.186129845 },
3316 { 0.022567e-6, 6133.512652857, 3.307984806 },
3317 /* 71, 80 */
3318 { 0.016155e-6, 10213.285546211, 1.331103168 },
3319 { 0.014751e-6, 1349.867409659, 4.308933301 },
3320 { 0.015949e-6, -220.412642439, 4.005298270 },
3321 { 0.015974e-6, -2352.866153772, 6.145309371 },
3322 { 0.014223e-6, 17789.845619785, 2.104551349 },
3323 { 0.017806e-6, 73.297125859, 3.475975097 },
3324 { 0.013671e-6, -536.804512095, 5.971672571 },
3325 { 0.011942e-6, 8031.092263058, 2.053414715 },
3326 { 0.014318e-6, 16730.463689596, 3.016058075 },
3327 { 0.012462e-6, 103.092774219, 1.737438797 },
3328 /* 81, 90 */
3329 { 0.010962e-6, 3.590428652, 2.196567739 },
3330 { 0.015078e-6, 19651.048481098, 3.969480770 },
3331 { 0.010396e-6, 951.718406251, 5.717799605 },
3332 { 0.011707e-6, -4705.732307544, 2.654125618 },
3333 { 0.010453e-6, 5863.591206116, 1.913704550 },
3334 { 0.012420e-6, 4690.479836359, 4.734090399 },
3335 { 0.011847e-6, 5643.178563677, 5.489005403 },
3336 { 0.008610e-6, 3340.612426700, 3.661698944 },
3337 { 0.011622e-6, 5120.601145584, 4.863931876 },
3338 { 0.010825e-6, 553.569402842, 0.842715011 },
3339 /* 91, 100 */
3340 { 0.008666e-6, -135.065080035, 3.293406547 },
3341 { 0.009963e-6, 149.563197135, 4.870690598 },
3342 { 0.009858e-6, 6309.374169791, 1.061816410 },
3343 { 0.007959e-6, 316.391869657, 2.465042647 },
3344 { 0.010099e-6, 283.859318865, 1.942176992 },
3345 { 0.007147e-6, -242.728603974, 3.661486981 },
3346 { 0.007505e-6, 5230.807466803, 4.920937029 },
3347 { 0.008323e-6, 11769.853693166, 1.229392026 },
3348 { 0.007490e-6, -6256.777530192, 3.658444681 },
3349 { 0.009370e-6, 149854.400134205, 0.673880395 },
3350 /* 101, 110 */
3351 { 0.007117e-6, 38.027672636, 5.294249518 },
3352 { 0.007857e-6, 12168.002696575, 0.525733528 },
3353 { 0.007019e-6, 6206.809778716, 0.837688810 },
3354 { 0.006056e-6, 955.599741609, 4.194535082 },
3355 { 0.008107e-6, 13367.972631107, 3.793235253 },
3356 { 0.006731e-6, 5650.292110678, 5.639906583 },
3357 { 0.007332e-6, 36.648562930, 0.114858677 },
3358 { 0.006366e-6, 4164.311989613, 2.262081818 },
3359 { 0.006858e-6, 5216.580372801, 0.642063318 },
3360 { 0.006919e-6, 6681.224853400, 6.018501522 },
3361 /* 111, 120 */
3362 { 0.006826e-6, 7632.943259650, 3.458654112 },
3363 { 0.005308e-6, -1592.596013633, 2.500382359 },
3364 { 0.005096e-6, 11371.704689758, 2.547107806 },
3365 { 0.004841e-6, 5333.900241022, 0.437078094 },
3366 { 0.005582e-6, 5966.683980335, 2.246174308 },
3367 { 0.006304e-6, 11926.254413669, 2.512929171 },
3368 { 0.006603e-6, 23581.258177318, 5.393136889 },
3369 { 0.005123e-6, -1.484472708, 2.999641028 },
3370 { 0.004648e-6, 1589.072895284, 1.275847090 },
3371 { 0.005119e-6, 6438.496249426, 1.486539246 },
3372 /* 121, 130 */
3373 { 0.004521e-6, 4292.330832950, 6.140635794 },
3374 { 0.005680e-6, 23013.539539587, 4.557814849 },
3375 { 0.005488e-6, -3.455808046, 0.090675389 },
3376 { 0.004193e-6, 7234.794256242, 4.869091389 },
3377 { 0.003742e-6, 7238.675591600, 4.691976180 },
3378 { 0.004148e-6, -110.206321219, 3.016173439 },
3379 { 0.004553e-6, 11499.656222793, 5.554998314 },
3380 { 0.004892e-6, 5436.993015240, 1.475415597 },
3381 { 0.004044e-6, 4732.030627343, 1.398784824 },
3382 { 0.004164e-6, 12491.370101415, 5.650931916 },
3383 /* 131, 140 */
3384 { 0.004349e-6, 11513.883316794, 2.181745369 },
3385 { 0.003919e-6, 12528.018664345, 5.823319737 },
3386 { 0.003129e-6, 6836.645252834, 0.003844094 },
3387 { 0.004080e-6, -7058.598461315, 3.690360123 },
3388 { 0.003270e-6, 76.266071276, 1.517189902 },
3389 { 0.002954e-6, 6283.143160294, 4.447203799 },
3390 { 0.002872e-6, 28.449187468, 1.158692983 },
3391 { 0.002881e-6, 735.876513532, 0.349250250 },
3392 { 0.003279e-6, 5849.364112115, 4.893384368 },
3393 { 0.003625e-6, 6209.778724132, 1.473760578 },
3394 /* 141, 150 */
3395 { 0.003074e-6, 949.175608970, 5.185878737 },
3396 { 0.002775e-6, 9917.696874510, 1.030026325 },
3397 { 0.002646e-6, 10973.555686350, 3.918259169 },
3398 { 0.002575e-6, 25132.303399966, 6.109659023 },
3399 { 0.003500e-6, 263.083923373, 1.892100742 },
3400 { 0.002740e-6, 18319.536584880, 4.320519510 },
3401 { 0.002464e-6, 202.253395174, 4.698203059 },
3402 { 0.002409e-6, 2.542797281, 5.325009315 },
3403 { 0.003354e-6, -90955.551694697, 1.942656623 },
3404 { 0.002296e-6, 6496.374945429, 5.061810696 },
3405 /* 151, 160 */
3406 { 0.003002e-6, 6172.869528772, 2.797822767 },
3407 { 0.003202e-6, 27511.467873537, 0.531673101 },
3408 { 0.002954e-6, -6283.008539689, 4.533471191 },
3409 { 0.002353e-6, 639.897286314, 3.734548088 },
3410 { 0.002401e-6, 16200.772724501, 2.605547070 },
3411 { 0.003053e-6, 233141.314403759, 3.029030662 },
3412 { 0.003024e-6, 83286.914269554, 2.355556099 },
3413 { 0.002863e-6, 17298.182327326, 5.240963796 },
3414 { 0.002103e-6, -7079.373856808, 5.756641637 },
3415 { 0.002303e-6, 83996.847317911, 2.013686814 },
3416 /* 161, 170 */
3417 { 0.002303e-6, 18073.704938650, 1.089100410 },
3418 { 0.002381e-6, 63.735898303, 0.759188178 },
3419 { 0.002493e-6, 6386.168624210, 0.645026535 },
3420 { 0.002366e-6, 3.932153263, 6.215885448 },
3421 { 0.002169e-6, 11015.106477335, 4.845297676 },
3422 { 0.002397e-6, 6243.458341645, 3.809290043 },
3423 { 0.002183e-6, 1162.474704408, 6.179611691 },
3424 { 0.002353e-6, 6246.427287062, 4.781719760 },
3425 { 0.002199e-6, -245.831646229, 5.956152284 },
3426 { 0.001729e-6, 3894.181829542, 1.264976635 },
3427 /* 171, 180 */
3428 { 0.001896e-6, -3128.388765096, 4.914231596 },
3429 { 0.002085e-6, 35.164090221, 1.405158503 },
3430 { 0.002024e-6, 14712.317116458, 2.752035928 },
3431 { 0.001737e-6, 6290.189396992, 5.280820144 },
3432 { 0.002229e-6, 491.557929457, 1.571007057 },
3433 { 0.001602e-6, 14314.168113050, 4.203664806 },
3434 { 0.002186e-6, 454.909366527, 1.402101526 },
3435 { 0.001897e-6, 22483.848574493, 4.167932508 },
3436 { 0.001825e-6, -3738.761430108, 0.545828785 },
3437 { 0.001894e-6, 1052.268383188, 5.817167450 },
3438 /* 181, 190 */
3439 { 0.001421e-6, 20.355319399, 2.419886601 },
3440 { 0.001408e-6, 10984.192351700, 2.732084787 },
3441 { 0.001847e-6, 10873.986030480, 2.903477885 },
3442 { 0.001391e-6, -8635.942003763, 0.593891500 },
3443 { 0.001388e-6, -7.046236698, 1.166145902 },
3444 { 0.001810e-6, -88860.057071188, 0.487355242 },
3445 { 0.001288e-6, -1990.745017041, 3.913022880 },
3446 { 0.001297e-6, 23543.230504682, 3.063805171 },
3447 { 0.001335e-6, -266.607041722, 3.995764039 },
3448 { 0.001376e-6, 10969.965257698, 5.152914309 },
3449 /* 191, 200 */
3450 { 0.001745e-6, 244287.600007027, 3.626395673 },
3451 { 0.001649e-6, 31441.677569757, 1.952049260 },
3452 { 0.001416e-6, 9225.539273283, 4.996408389 },
3453 { 0.001238e-6, 4804.209275927, 5.503379738 },
3454 { 0.001472e-6, 4590.910180489, 4.164913291 },
3455 { 0.001169e-6, 6040.347246017, 5.841719038 },
3456 { 0.001039e-6, 5540.085789459, 2.769753519 },
3457 { 0.001004e-6, -170.672870619, 0.755008103 },
3458 { 0.001284e-6, 10575.406682942, 5.306538209 },
3459 { 0.001278e-6, 71.812653151, 4.713486491 },
3460 /* 201, 210 */
3461 { 0.001321e-6, 18209.330263660, 2.624866359 },
3462 { 0.001297e-6, 21228.392023546, 0.382603541 },
3463 { 0.000954e-6, 6282.095528923, 0.882213514 },
3464 { 0.001145e-6, 6058.731054289, 1.169483931 },
3465 { 0.000979e-6, 5547.199336460, 5.448375984 },
3466 { 0.000987e-6, -6262.300454499, 2.656486959 },
3467 { 0.001070e-6, -154717.609887482, 1.827624012 },
3468 { 0.000991e-6, 4701.116501708, 4.387001801 },
3469 { 0.001155e-6, -14.227094002, 3.042700750 },
3470 { 0.001176e-6, 277.034993741, 3.335519004 },
3471 /* 211, 220 */
3472 { 0.000890e-6, 13916.019109642, 5.601498297 },
3473 { 0.000884e-6, -1551.045222648, 1.088831705 },
3474 { 0.000876e-6, 5017.508371365, 3.969902609 },
3475 { 0.000806e-6, 15110.466119866, 5.142876744 },
3476 { 0.000773e-6, -4136.910433516, 0.022067765 },
3477 { 0.001077e-6, 175.166059800, 1.844913056 },
3478 { 0.000954e-6, -6284.056171060, 0.968480906 },
3479 { 0.000737e-6, 5326.786694021, 4.923831588 },
3480 { 0.000845e-6, -433.711737877, 4.749245231 },
3481 { 0.000819e-6, 8662.240323563, 5.991247817 },
3482 /* 221, 230 */
3483 { 0.000852e-6, 199.072001436, 2.189604979 },
3484 { 0.000723e-6, 17256.631536341, 6.068719637 },
3485 { 0.000940e-6, 6037.244203762, 6.197428148 },
3486 { 0.000885e-6, 11712.955318231, 3.280414875 },
3487 { 0.000706e-6, 12559.038152982, 2.824848947 },
3488 { 0.000732e-6, 2379.164473572, 2.501813417 },
3489 { 0.000764e-6, -6127.655450557, 2.236346329 },
3490 { 0.000908e-6, 131.541961686, 2.521257490 },
3491 { 0.000907e-6, 35371.887265976, 3.370195967 },
3492 { 0.000673e-6, 1066.495477190, 3.876512374 },
3493 /* 231, 240 */
3494 { 0.000814e-6, 17654.780539750, 4.627122566 },
3495 { 0.000630e-6, 36.027866677, 0.156368499 },
3496 { 0.000798e-6, 515.463871093, 5.151962502 },
3497 { 0.000798e-6, 148.078724426, 5.909225055 },
3498 { 0.000806e-6, 309.278322656, 6.054064447 },
3499 { 0.000607e-6, -39.617508346, 2.839021623 },
3500 { 0.000601e-6, 412.371096874, 3.984225404 },
3501 { 0.000646e-6, 11403.676995575, 3.852959484 },
3502 { 0.000704e-6, 13521.751441591, 2.300991267 },
3503 { 0.000603e-6, -65147.619767937, 4.140083146 },
3504 /* 241, 250 */
3505 { 0.000609e-6, 10177.257679534, 0.437122327 },
3506 { 0.000631e-6, 5767.611978898, 4.026532329 },
3507 { 0.000576e-6, 11087.285125918, 4.760293101 },
3508 { 0.000674e-6, 14945.316173554, 6.270510511 },
3509 { 0.000726e-6, 5429.879468239, 6.039606892 },
3510 { 0.000710e-6, 28766.924424484, 5.672617711 },
3511 { 0.000647e-6, 11856.218651625, 3.397132627 },
3512 { 0.000678e-6, -5481.254918868, 6.249666675 },
3513 { 0.000618e-6, 22003.914634870, 2.466427018 },
3514 { 0.000738e-6, 6134.997125565, 2.242668890 },
3515 /* 251, 260 */
3516 { 0.000660e-6, 625.670192312, 5.864091907 },
3517 { 0.000694e-6, 3496.032826134, 2.668309141 },
3518 { 0.000531e-6, 6489.261398429, 1.681888780 },
3519 { 0.000611e-6, -143571.324284214, 2.424978312 },
3520 { 0.000575e-6, 12043.574281889, 4.216492400 },
3521 { 0.000553e-6, 12416.588502848, 4.772158039 },
3522 { 0.000689e-6, 4686.889407707, 6.224271088 },
3523 { 0.000495e-6, 7342.457780181, 3.817285811 },
3524 { 0.000567e-6, 3634.621024518, 1.649264690 },
3525 { 0.000515e-6, 18635.928454536, 3.945345892 },
3526 /* 261, 270 */
3527 { 0.000486e-6, -323.505416657, 4.061673868 },
3528 { 0.000662e-6, 25158.601719765, 1.794058369 },
3529 { 0.000509e-6, 846.082834751, 3.053874588 },
3530 { 0.000472e-6, -12569.674818332, 5.112133338 },
3531 { 0.000461e-6, 6179.983075773, 0.513669325 },
3532 { 0.000641e-6, 83467.156352816, 3.210727723 },
3533 { 0.000520e-6, 10344.295065386, 2.445597761 },
3534 { 0.000493e-6, 18422.629359098, 1.676939306 },
3535 { 0.000478e-6, 1265.567478626, 5.487314569 },
3536 { 0.000472e-6, -18.159247265, 1.999707589 },
3537 /* 271, 280 */
3538 { 0.000559e-6, 11190.377900137, 5.783236356 },
3539 { 0.000494e-6, 9623.688276691, 3.022645053 },
3540 { 0.000463e-6, 5739.157790895, 1.411223013 },
3541 { 0.000432e-6, 16858.482532933, 1.179256434 },
3542 { 0.000574e-6, 72140.628666286, 1.758191830 },
3543 { 0.000484e-6, 17267.268201691, 3.290589143 },
3544 { 0.000550e-6, 4907.302050146, 0.864024298 },
3545 { 0.000399e-6, 14.977853527, 2.094441910 },
3546 { 0.000491e-6, 224.344795702, 0.878372791 },
3547 { 0.000432e-6, 20426.571092422, 6.003829241 },
3548 /* 281, 290 */
3549 { 0.000481e-6, 5749.452731634, 4.309591964 },
3550 { 0.000480e-6, 5757.317038160, 1.142348571 },
3551 { 0.000485e-6, 6702.560493867, 0.210580917 },
3552 { 0.000426e-6, 6055.549660552, 4.274476529 },
3553 { 0.000480e-6, 5959.570433334, 5.031351030 },
3554 { 0.000466e-6, 12562.628581634, 4.959581597 },
3555 { 0.000520e-6, 39302.096962196, 4.788002889 },
3556 { 0.000458e-6, 12132.439962106, 1.880103788 },
3557 { 0.000470e-6, 12029.347187887, 1.405611197 },
3558 { 0.000416e-6, -7477.522860216, 1.082356330 },
3559 /* 291, 300 */
3560 { 0.000449e-6, 11609.862544012, 4.179989585 },
3561 { 0.000465e-6, 17253.041107690, 0.353496295 },
3562 { 0.000362e-6, -4535.059436924, 1.583849576 },
3563 { 0.000383e-6, 21954.157609398, 3.747376371 },
3564 { 0.000389e-6, 17.252277143, 1.395753179 },
3565 { 0.000331e-6, 18052.929543158, 0.566790582 },
3566 { 0.000430e-6, 13517.870106233, 0.685827538 },
3567 { 0.000368e-6, -5756.908003246, 0.731374317 },
3568 { 0.000330e-6, 10557.594160824, 3.710043680 },
3569 { 0.000332e-6, 20199.094959633, 1.652901407 },
3570 /* 301, 310 */
3571 { 0.000384e-6, 11933.367960670, 5.827781531 },
3572 { 0.000387e-6, 10454.501386605, 2.541182564 },
3573 { 0.000325e-6, 15671.081759407, 2.178850542 },
3574 { 0.000318e-6, 138.517496871, 2.253253037 },
3575 { 0.000305e-6, 9388.005909415, 0.578340206 },
3576 { 0.000352e-6, 5749.861766548, 3.000297967 },
3577 { 0.000311e-6, 6915.859589305, 1.693574249 },
3578 { 0.000297e-6, 24072.921469776, 1.997249392 },
3579 { 0.000363e-6, -640.877607382, 5.071820966 },
3580 { 0.000323e-6, 12592.450019783, 1.072262823 },
3581 /* 311, 320 */
3582 { 0.000341e-6, 12146.667056108, 4.700657997 },
3583 { 0.000290e-6, 9779.108676125, 1.812320441 },
3584 { 0.000342e-6, 6132.028180148, 4.322238614 },
3585 { 0.000329e-6, 6268.848755990, 3.033827743 },
3586 { 0.000374e-6, 17996.031168222, 3.388716544 },
3587 { 0.000285e-6, -533.214083444, 4.687313233 },
3588 { 0.000338e-6, 6065.844601290, 0.877776108 },
3589 { 0.000276e-6, 24.298513841, 0.770299429 },
3590 { 0.000336e-6, -2388.894020449, 5.353796034 },
3591 { 0.000290e-6, 3097.883822726, 4.075291557 },
3592 /* 321, 330 */
3593 { 0.000318e-6, 709.933048357, 5.941207518 },
3594 { 0.000271e-6, 13095.842665077, 3.208912203 },
3595 { 0.000331e-6, 6073.708907816, 4.007881169 },
3596 { 0.000292e-6, 742.990060533, 2.714333592 },
3597 { 0.000362e-6, 29088.811415985, 3.215977013 },
3598 { 0.000280e-6, 12359.966151546, 0.710872502 },
3599 { 0.000267e-6, 10440.274292604, 4.730108488 },
3600 { 0.000262e-6, 838.969287750, 1.327720272 },
3601 { 0.000250e-6, 16496.361396202, 0.898769761 },
3602 { 0.000325e-6, 20597.243963041, 0.180044365 },
3603 /* 331, 340 */
3604 { 0.000268e-6, 6148.010769956, 5.152666276 },
3605 { 0.000284e-6, 5636.065016677, 5.655385808 },
3606 { 0.000301e-6, 6080.822454817, 2.135396205 },
3607 { 0.000294e-6, -377.373607916, 3.708784168 },
3608 { 0.000236e-6, 2118.763860378, 1.733578756 },
3609 { 0.000234e-6, 5867.523359379, 5.575209112 },
3610 { 0.000268e-6, -226858.238553767, 0.069432392 },
3611 { 0.000265e-6, 167283.761587465, 4.369302826 },
3612 { 0.000280e-6, 28237.233459389, 5.304829118 },
3613 { 0.000292e-6, 12345.739057544, 4.096094132 },
3614 /* 341, 350 */
3615 { 0.000223e-6, 19800.945956225, 3.069327406 },
3616 { 0.000301e-6, 43232.306658416, 6.205311188 },
3617 { 0.000264e-6, 18875.525869774, 1.417263408 },
3618 { 0.000304e-6, -1823.175188677, 3.409035232 },
3619 { 0.000301e-6, 109.945688789, 0.510922054 },
3620 { 0.000260e-6, 813.550283960, 2.389438934 },
3621 { 0.000299e-6, 316428.228673312, 5.384595078 },
3622 { 0.000211e-6, 5756.566278634, 3.789392838 },
3623 { 0.000209e-6, 5750.203491159, 1.661943545 },
3624 { 0.000240e-6, 12489.885628707, 5.684549045 },
3625 /* 351, 360 */
3626 { 0.000216e-6, 6303.851245484, 3.862942261 },
3627 { 0.000203e-6, 1581.959348283, 5.549853589 },
3628 { 0.000200e-6, 5642.198242609, 1.016115785 },
3629 { 0.000197e-6, -70.849445304, 4.690702525 },
3630 { 0.000227e-6, 6287.008003254, 2.911891613 },
3631 { 0.000197e-6, 533.623118358, 1.048982898 },
3632 { 0.000205e-6, -6279.485421340, 1.829362730 },
3633 { 0.000209e-6, -10988.808157535, 2.636140084 },
3634 { 0.000208e-6, -227.526189440, 4.127883842 },
3635 { 0.000191e-6, 415.552490612, 4.401165650 },
3636 /* 361, 370 */
3637 { 0.000190e-6, 29296.615389579, 4.175658539 },
3638 { 0.000264e-6, 66567.485864652, 4.601102551 },
3639 { 0.000256e-6, -3646.350377354, 0.506364778 },
3640 { 0.000188e-6, 13119.721102825, 2.032195842 },
3641 { 0.000185e-6, -209.366942175, 4.694756586 },
3642 { 0.000198e-6, 25934.124331089, 3.832703118 },
3643 { 0.000195e-6, 4061.219215394, 3.308463427 },
3644 { 0.000234e-6, 5113.487598583, 1.716090661 },
3645 { 0.000188e-6, 1478.866574064, 5.686865780 },
3646 { 0.000222e-6, 11823.161639450, 1.942386641 },
3647 /* 371, 380 */
3648 { 0.000181e-6, 10770.893256262, 1.999482059 },
3649 { 0.000171e-6, 6546.159773364, 1.182807992 },
3650 { 0.000206e-6, 70.328180442, 5.934076062 },
3651 { 0.000169e-6, 20995.392966449, 2.169080622 },
3652 { 0.000191e-6, 10660.686935042, 5.405515999 },
3653 { 0.000228e-6, 33019.021112205, 4.656985514 },
3654 { 0.000184e-6, -4933.208440333, 3.327476868 },
3655 { 0.000220e-6, -135.625325010, 1.765430262 },
3656 { 0.000166e-6, 23141.558382925, 3.454132746 },
3657 { 0.000191e-6, 6144.558353121, 5.020393445 },
3658 /* 381, 390 */
3659 { 0.000180e-6, 6084.003848555, 0.602182191 },
3660 { 0.000163e-6, 17782.732072784, 4.960593133 },
3661 { 0.000225e-6, 16460.333529525, 2.596451817 },
3662 { 0.000222e-6, 5905.702242076, 3.731990323 },
3663 { 0.000204e-6, 227.476132789, 5.636192701 },
3664 { 0.000159e-6, 16737.577236597, 3.600691544 },
3665 { 0.000200e-6, 6805.653268085, 0.868220961 },
3666 { 0.000187e-6, 11919.140866668, 2.629456641 },
3667 { 0.000161e-6, 127.471796607, 2.862574720 },
3668 { 0.000205e-6, 6286.666278643, 1.742882331 },
3669 /* 391, 400 */
3670 { 0.000189e-6, 153.778810485, 4.812372643 },
3671 { 0.000168e-6, 16723.350142595, 0.027860588 },
3672 { 0.000149e-6, 11720.068865232, 0.659721876 },
3673 { 0.000189e-6, 5237.921013804, 5.245313000 },
3674 { 0.000143e-6, 6709.674040867, 4.317625647 },
3675 { 0.000146e-6, 4487.817406270, 4.815297007 },
3676 { 0.000144e-6, -664.756045130, 5.381366880 },
3677 { 0.000175e-6, 5127.714692584, 4.728443327 },
3678 { 0.000162e-6, 6254.626662524, 1.435132069 },
3679 { 0.000187e-6, 47162.516354635, 1.354371923 },
3680 /* 401, 410 */
3681 { 0.000146e-6, 11080.171578918, 3.369695406 },
3682 { 0.000180e-6, -348.924420448, 2.490902145 },
3683 { 0.000148e-6, 151.047669843, 3.799109588 },
3684 { 0.000157e-6, 6197.248551160, 1.284375887 },
3685 { 0.000167e-6, 146.594251718, 0.759969109 },
3686 { 0.000133e-6, -5331.357443741, 5.409701889 },
3687 { 0.000154e-6, 95.979227218, 3.366890614 },
3688 { 0.000148e-6, -6418.140930027, 3.384104996 },
3689 { 0.000128e-6, -6525.804453965, 3.803419985 },
3690 { 0.000130e-6, 11293.470674356, 0.939039445 },
3691 /* 411, 420 */
3692 { 0.000152e-6, -5729.506447149, 0.734117523 },
3693 { 0.000138e-6, 210.117701700, 2.564216078 },
3694 { 0.000123e-6, 6066.595360816, 4.517099537 },
3695 { 0.000140e-6, 18451.078546566, 0.642049130 },
3696 { 0.000126e-6, 11300.584221356, 3.485280663 },
3697 { 0.000119e-6, 10027.903195729, 3.217431161 },
3698 { 0.000151e-6, 4274.518310832, 4.404359108 },
3699 { 0.000117e-6, 6072.958148291, 0.366324650 },
3700 { 0.000165e-6, -7668.637425143, 4.298212528 },
3701 { 0.000117e-6, -6245.048177356, 5.379518958 },
3702 /* 421, 430 */
3703 { 0.000130e-6, -5888.449964932, 4.527681115 },
3704 { 0.000121e-6, -543.918059096, 6.109429504 },
3705 { 0.000162e-6, 9683.594581116, 5.720092446 },
3706 { 0.000141e-6, 6219.339951688, 0.679068671 },
3707 { 0.000118e-6, 22743.409379516, 4.881123092 },
3708 { 0.000129e-6, 1692.165669502, 0.351407289 },
3709 { 0.000126e-6, 5657.405657679, 5.146592349 },
3710 { 0.000114e-6, 728.762966531, 0.520791814 },
3711 { 0.000120e-6, 52.596639600, 0.948516300 },
3712 { 0.000115e-6, 65.220371012, 3.504914846 },
3713 /* 431, 440 */
3714 { 0.000126e-6, 5881.403728234, 5.577502482 },
3715 { 0.000158e-6, 163096.180360983, 2.957128968 },
3716 { 0.000134e-6, 12341.806904281, 2.598576764 },
3717 { 0.000151e-6, 16627.370915377, 3.985702050 },
3718 { 0.000109e-6, 1368.660252845, 0.014730471 },
3719 { 0.000131e-6, 6211.263196841, 0.085077024 },
3720 { 0.000146e-6, 5792.741760812, 0.708426604 },
3721 { 0.000146e-6, -77.750543984, 3.121576600 },
3722 { 0.000107e-6, 5341.013788022, 0.288231904 },
3723 { 0.000138e-6, 6281.591377283, 2.797450317 },
3724 /* 441, 450 */
3725 { 0.000113e-6, -6277.552925684, 2.788904128 },
3726 { 0.000115e-6, -525.758811831, 5.895222200 },
3727 { 0.000138e-6, 6016.468808270, 6.096188999 },
3728 { 0.000139e-6, 23539.707386333, 2.028195445 },
3729 { 0.000146e-6, -4176.041342449, 4.660008502 },
3730 { 0.000107e-6, 16062.184526117, 4.066520001 },
3731 { 0.000142e-6, 83783.548222473, 2.936315115 },
3732 { 0.000128e-6, 9380.959672717, 3.223844306 },
3733 { 0.000135e-6, 6205.325306007, 1.638054048 },
3734 { 0.000101e-6, 2699.734819318, 5.481603249 },
3735 /* 451, 460 */
3736 { 0.000104e-6, -568.821874027, 2.205734493 },
3737 { 0.000103e-6, 6321.103522627, 2.440421099 },
3738 { 0.000119e-6, 6321.208885629, 2.547496264 },
3739 { 0.000138e-6, 1975.492545856, 2.314608466 },
3740 { 0.000121e-6, 137.033024162, 4.539108237 },
3741 { 0.000123e-6, 19402.796952817, 4.538074405 },
3742 { 0.000119e-6, 22805.735565994, 2.869040566 },
3743 { 0.000133e-6, 64471.991241142, 6.056405489 },
3744 { 0.000129e-6, -85.827298831, 2.540635083 },
3745 { 0.000131e-6, 13613.804277336, 4.005732868 },
3746 /* 461, 470 */
3747 { 0.000104e-6, 9814.604100291, 1.959967212 },
3748 { 0.000112e-6, 16097.679950283, 3.589026260 },
3749 { 0.000123e-6, 2107.034507542, 1.728627253 },
3750 { 0.000121e-6, 36949.230808424, 6.072332087 },
3751 { 0.000108e-6, -12539.853380183, 3.716133846 },
3752 { 0.000113e-6, -7875.671863624, 2.725771122 },
3753 { 0.000109e-6, 4171.425536614, 4.033338079 },
3754 { 0.000101e-6, 6247.911759770, 3.441347021 },
3755 { 0.000113e-6, 7330.728427345, 0.656372122 },
3756 { 0.000113e-6, 51092.726050855, 2.791483066 },
3757 /* 471, 480 */
3758 { 0.000106e-6, 5621.842923210, 1.815323326 },
3759 { 0.000101e-6, 111.430161497, 5.711033677 },
3760 { 0.000103e-6, 909.818733055, 2.812745443 },
3761 { 0.000101e-6, 1790.642637886, 1.965746028 },
3762
3763 /* T */
3764 { 102.156724e-6, 6283.075849991, 4.249032005 },
3765 { 1.706807e-6, 12566.151699983, 4.205904248 },
3766 { 0.269668e-6, 213.299095438, 3.400290479 },
3767 { 0.265919e-6, 529.690965095, 5.836047367 },
3768 { 0.210568e-6, -3.523118349, 6.262738348 },
3769 { 0.077996e-6, 5223.693919802, 4.670344204 },
3770 /* 481, 490 */
3771 { 0.054764e-6, 1577.343542448, 4.534800170 },
3772 { 0.059146e-6, 26.298319800, 1.083044735 },
3773 { 0.034420e-6, -398.149003408, 5.980077351 },
3774 { 0.032088e-6, 18849.227549974, 4.162913471 },
3775 { 0.033595e-6, 5507.553238667, 5.980162321 },
3776 { 0.029198e-6, 5856.477659115, 0.623811863 },
3777 { 0.027764e-6, 155.420399434, 3.745318113 },
3778 { 0.025190e-6, 5746.271337896, 2.980330535 },
3779 { 0.022997e-6, -796.298006816, 1.174411803 },
3780 { 0.024976e-6, 5760.498431898, 2.467913690 },
3781 /* 491, 500 */
3782 { 0.021774e-6, 206.185548437, 3.854787540 },
3783 { 0.017925e-6, -775.522611324, 1.092065955 },
3784 { 0.013794e-6, 426.598190876, 2.699831988 },
3785 { 0.013276e-6, 6062.663207553, 5.845801920 },
3786 { 0.011774e-6, 12036.460734888, 2.292832062 },
3787 { 0.012869e-6, 6076.890301554, 5.333425680 },
3788 { 0.012152e-6, 1059.381930189, 6.222874454 },
3789 { 0.011081e-6, -7.113547001, 5.154724984 },
3790 { 0.010143e-6, 4694.002954708, 4.044013795 },
3791 { 0.009357e-6, 5486.777843175, 3.416081409 },
3792 /* 501, 510 */
3793 { 0.010084e-6, 522.577418094, 0.749320262 },
3794 { 0.008587e-6, 10977.078804699, 2.777152598 },
3795 { 0.008628e-6, 6275.962302991, 4.562060226 },
3796 { 0.008158e-6, -220.412642439, 5.806891533 },
3797 { 0.007746e-6, 2544.314419883, 1.603197066 },
3798 { 0.007670e-6, 2146.165416475, 3.000200440 },
3799 { 0.007098e-6, 74.781598567, 0.443725817 },
3800 { 0.006180e-6, -536.804512095, 1.302642751 },
3801 { 0.005818e-6, 5088.628839767, 4.827723531 },
3802 { 0.004945e-6, -6286.598968340, 0.268305170 },
3803 /* 511, 520 */
3804 { 0.004774e-6, 1349.867409659, 5.808636673 },
3805 { 0.004687e-6, -242.728603974, 5.154890570 },
3806 { 0.006089e-6, 1748.016413067, 4.403765209 },
3807 { 0.005975e-6, -1194.447010225, 2.583472591 },
3808 { 0.004229e-6, 951.718406251, 0.931172179 },
3809 { 0.005264e-6, 553.569402842, 2.336107252 },
3810 { 0.003049e-6, 5643.178563677, 1.362634430 },
3811 { 0.002974e-6, 6812.766815086, 1.583012668 },
3812 { 0.003403e-6, -2352.866153772, 2.552189886 },
3813 { 0.003030e-6, 419.484643875, 5.286473844 },
3814 /* 521, 530 */
3815 { 0.003210e-6, -7.046236698, 1.863796539 },
3816 { 0.003058e-6, 9437.762934887, 4.226420633 },
3817 { 0.002589e-6, 12352.852604545, 1.991935820 },
3818 { 0.002927e-6, 5216.580372801, 2.319951253 },
3819 { 0.002425e-6, 5230.807466803, 3.084752833 },
3820 { 0.002656e-6, 3154.687084896, 2.487447866 },
3821 { 0.002445e-6, 10447.387839604, 2.347139160 },
3822 { 0.002990e-6, 4690.479836359, 6.235872050 },
3823 { 0.002890e-6, 5863.591206116, 0.095197563 },
3824 { 0.002498e-6, 6438.496249426, 2.994779800 },
3825 /* 531, 540 */
3826 { 0.001889e-6, 8031.092263058, 3.569003717 },
3827 { 0.002567e-6, 801.820931124, 3.425611498 },
3828 { 0.001803e-6, -71430.695617928, 2.192295512 },
3829 { 0.001782e-6, 3.932153263, 5.180433689 },
3830 { 0.001694e-6, -4705.732307544, 4.641779174 },
3831 { 0.001704e-6, -1592.596013633, 3.997097652 },
3832 { 0.001735e-6, 5849.364112115, 0.417558428 },
3833 { 0.001643e-6, 8429.241266467, 2.180619584 },
3834 { 0.001680e-6, 38.133035638, 4.164529426 },
3835 { 0.002045e-6, 7084.896781115, 0.526323854 },
3836 /* 541, 550 */
3837 { 0.001458e-6, 4292.330832950, 1.356098141 },
3838 { 0.001437e-6, 20.355319399, 3.895439360 },
3839 { 0.001738e-6, 6279.552731642, 0.087484036 },
3840 { 0.001367e-6, 14143.495242431, 3.987576591 },
3841 { 0.001344e-6, 7234.794256242, 0.090454338 },
3842 { 0.001438e-6, 11499.656222793, 0.974387904 },
3843 { 0.001257e-6, 6836.645252834, 1.509069366 },
3844 { 0.001358e-6, 11513.883316794, 0.495572260 },
3845 { 0.001628e-6, 7632.943259650, 4.968445721 },
3846 { 0.001169e-6, 103.092774219, 2.838496795 },
3847 /* 551, 560 */
3848 { 0.001162e-6, 4164.311989613, 3.408387778 },
3849 { 0.001092e-6, 6069.776754553, 3.617942651 },
3850 { 0.001008e-6, 17789.845619785, 0.286350174 },
3851 { 0.001008e-6, 639.897286314, 1.610762073 },
3852 { 0.000918e-6, 10213.285546211, 5.532798067 },
3853 { 0.001011e-6, -6256.777530192, 0.661826484 },
3854 { 0.000753e-6, 16730.463689596, 3.905030235 },
3855 { 0.000737e-6, 11926.254413669, 4.641956361 },
3856 { 0.000694e-6, 3340.612426700, 2.111120332 },
3857 { 0.000701e-6, 3894.181829542, 2.760823491 },
3858 /* 561, 570 */
3859 { 0.000689e-6, -135.065080035, 4.768800780 },
3860 { 0.000700e-6, 13367.972631107, 5.760439898 },
3861 { 0.000664e-6, 6040.347246017, 1.051215840 },
3862 { 0.000654e-6, 5650.292110678, 4.911332503 },
3863 { 0.000788e-6, 6681.224853400, 4.699648011 },
3864 { 0.000628e-6, 5333.900241022, 5.024608847 },
3865 { 0.000755e-6, -110.206321219, 4.370971253 },
3866 { 0.000628e-6, 6290.189396992, 3.660478857 },
3867 { 0.000635e-6, 25132.303399966, 4.121051532 },
3868 { 0.000534e-6, 5966.683980335, 1.173284524 },
3869 /* 571, 580 */
3870 { 0.000543e-6, -433.711737877, 0.345585464 },
3871 { 0.000517e-6, -1990.745017041, 5.414571768 },
3872 { 0.000504e-6, 5767.611978898, 2.328281115 },
3873 { 0.000485e-6, 5753.384884897, 1.685874771 },
3874 { 0.000463e-6, 7860.419392439, 5.297703006 },
3875 { 0.000604e-6, 515.463871093, 0.591998446 },
3876 { 0.000443e-6, 12168.002696575, 4.830881244 },
3877 { 0.000570e-6, 199.072001436, 3.899190272 },
3878 { 0.000465e-6, 10969.965257698, 0.476681802 },
3879 { 0.000424e-6, -7079.373856808, 1.112242763 },
3880 /* 581, 590 */
3881 { 0.000427e-6, 735.876513532, 1.994214480 },
3882 { 0.000478e-6, -6127.655450557, 3.778025483 },
3883 { 0.000414e-6, 10973.555686350, 5.441088327 },
3884 { 0.000512e-6, 1589.072895284, 0.107123853 },
3885 { 0.000378e-6, 10984.192351700, 0.915087231 },
3886 { 0.000402e-6, 11371.704689758, 4.107281715 },
3887 { 0.000453e-6, 9917.696874510, 1.917490952 },
3888 { 0.000395e-6, 149.563197135, 2.763124165 },
3889 { 0.000371e-6, 5739.157790895, 3.112111866 },
3890 { 0.000350e-6, 11790.629088659, 0.440639857 },
3891 /* 591, 600 */
3892 { 0.000356e-6, 6133.512652857, 5.444568842 },
3893 { 0.000344e-6, 412.371096874, 5.676832684 },
3894 { 0.000383e-6, 955.599741609, 5.559734846 },
3895 { 0.000333e-6, 6496.374945429, 0.261537984 },
3896 { 0.000340e-6, 6055.549660552, 5.975534987 },
3897 { 0.000334e-6, 1066.495477190, 2.335063907 },
3898 { 0.000399e-6, 11506.769769794, 5.321230910 },
3899 { 0.000314e-6, 18319.536584880, 2.313312404 },
3900 { 0.000424e-6, 1052.268383188, 1.211961766 },
3901 { 0.000307e-6, 63.735898303, 3.169551388 },
3902 /* 601, 610 */
3903 { 0.000329e-6, 29.821438149, 6.106912080 },
3904 { 0.000357e-6, 6309.374169791, 4.223760346 },
3905 { 0.000312e-6, -3738.761430108, 2.180556645 },
3906 { 0.000301e-6, 309.278322656, 1.499984572 },
3907 { 0.000268e-6, 12043.574281889, 2.447520648 },
3908 { 0.000257e-6, 12491.370101415, 3.662331761 },
3909 { 0.000290e-6, 625.670192312, 1.272834584 },
3910 { 0.000256e-6, 5429.879468239, 1.913426912 },
3911 { 0.000339e-6, 3496.032826134, 4.165930011 },
3912 { 0.000283e-6, 3930.209696220, 4.325565754 },
3913 /* 611, 620 */
3914 { 0.000241e-6, 12528.018664345, 3.832324536 },
3915 { 0.000304e-6, 4686.889407707, 1.612348468 },
3916 { 0.000259e-6, 16200.772724501, 3.470173146 },
3917 { 0.000238e-6, 12139.553509107, 1.147977842 },
3918 { 0.000236e-6, 6172.869528772, 3.776271728 },
3919 { 0.000296e-6, -7058.598461315, 0.460368852 },
3920 { 0.000306e-6, 10575.406682942, 0.554749016 },
3921 { 0.000251e-6, 17298.182327326, 0.834332510 },
3922 { 0.000290e-6, 4732.030627343, 4.759564091 },
3923 { 0.000261e-6, 5884.926846583, 0.298259862 },
3924 /* 621, 630 */
3925 { 0.000249e-6, 5547.199336460, 3.749366406 },
3926 { 0.000213e-6, 11712.955318231, 5.415666119 },
3927 { 0.000223e-6, 4701.116501708, 2.703203558 },
3928 { 0.000268e-6, -640.877607382, 0.283670793 },
3929 { 0.000209e-6, 5636.065016677, 1.238477199 },
3930 { 0.000193e-6, 10177.257679534, 1.943251340 },
3931 { 0.000182e-6, 6283.143160294, 2.456157599 },
3932 { 0.000184e-6, -227.526189440, 5.888038582 },
3933 { 0.000182e-6, -6283.008539689, 0.241332086 },
3934 { 0.000228e-6, -6284.056171060, 2.657323816 },
3935 /* 631, 640 */
3936 { 0.000166e-6, 7238.675591600, 5.930629110 },
3937 { 0.000167e-6, 3097.883822726, 5.570955333 },
3938 { 0.000159e-6, -323.505416657, 5.786670700 },
3939 { 0.000154e-6, -4136.910433516, 1.517805532 },
3940 { 0.000176e-6, 12029.347187887, 3.139266834 },
3941 { 0.000167e-6, 12132.439962106, 3.556352289 },
3942 { 0.000153e-6, 202.253395174, 1.463313961 },
3943 { 0.000157e-6, 17267.268201691, 1.586837396 },
3944 { 0.000142e-6, 83996.847317911, 0.022670115 },
3945 { 0.000152e-6, 17260.154654690, 0.708528947 },
3946 /* 641, 650 */
3947 { 0.000144e-6, 6084.003848555, 5.187075177 },
3948 { 0.000135e-6, 5756.566278634, 1.993229262 },
3949 { 0.000134e-6, 5750.203491159, 3.457197134 },
3950 { 0.000144e-6, 5326.786694021, 6.066193291 },
3951 { 0.000160e-6, 11015.106477335, 1.710431974 },
3952 { 0.000133e-6, 3634.621024518, 2.836451652 },
3953 { 0.000134e-6, 18073.704938650, 5.453106665 },
3954 { 0.000134e-6, 1162.474704408, 5.326898811 },
3955 { 0.000128e-6, 5642.198242609, 2.511652591 },
3956 { 0.000160e-6, 632.783739313, 5.628785365 },
3957 /* 651, 660 */
3958 { 0.000132e-6, 13916.019109642, 0.819294053 },
3959 { 0.000122e-6, 14314.168113050, 5.677408071 },
3960 { 0.000125e-6, 12359.966151546, 5.251984735 },
3961 { 0.000121e-6, 5749.452731634, 2.210924603 },
3962 { 0.000136e-6, -245.831646229, 1.646502367 },
3963 { 0.000120e-6, 5757.317038160, 3.240883049 },
3964 { 0.000134e-6, 12146.667056108, 3.059480037 },
3965 { 0.000137e-6, 6206.809778716, 1.867105418 },
3966 { 0.000141e-6, 17253.041107690, 2.069217456 },
3967 { 0.000129e-6, -7477.522860216, 2.781469314 },
3968 /* 661, 670 */
3969 { 0.000116e-6, 5540.085789459, 4.281176991 },
3970 { 0.000116e-6, 9779.108676125, 3.320925381 },
3971 { 0.000129e-6, 5237.921013804, 3.497704076 },
3972 { 0.000113e-6, 5959.570433334, 0.983210840 },
3973 { 0.000122e-6, 6282.095528923, 2.674938860 },
3974 { 0.000140e-6, -11.045700264, 4.957936982 },
3975 { 0.000108e-6, 23543.230504682, 1.390113589 },
3976 { 0.000106e-6, -12569.674818332, 0.429631317 },
3977 { 0.000110e-6, -266.607041722, 5.501340197 },
3978 { 0.000115e-6, 12559.038152982, 4.691456618 },
3979 /* 671, 680 */
3980 { 0.000134e-6, -2388.894020449, 0.577313584 },
3981 { 0.000109e-6, 10440.274292604, 6.218148717 },
3982 { 0.000102e-6, -543.918059096, 1.477842615 },
3983 { 0.000108e-6, 21228.392023546, 2.237753948 },
3984 { 0.000101e-6, -4535.059436924, 3.100492232 },
3985 { 0.000103e-6, 76.266071276, 5.594294322 },
3986 { 0.000104e-6, 949.175608970, 5.674287810 },
3987 { 0.000101e-6, 13517.870106233, 2.196632348 },
3988 { 0.000100e-6, 11933.367960670, 4.056084160 },
3989
3990 /* T^2 */
3991 { 4.322990e-6, 6283.075849991, 2.642893748 },
3992 /* 681, 690 */
3993 { 0.406495e-6, 0.000000000, 4.712388980 },
3994 { 0.122605e-6, 12566.151699983, 2.438140634 },
3995 { 0.019476e-6, 213.299095438, 1.642186981 },
3996 { 0.016916e-6, 529.690965095, 4.510959344 },
3997 { 0.013374e-6, -3.523118349, 1.502210314 },
3998 { 0.008042e-6, 26.298319800, 0.478549024 },
3999 { 0.007824e-6, 155.420399434, 5.254710405 },
4000 { 0.004894e-6, 5746.271337896, 4.683210850 },
4001 { 0.004875e-6, 5760.498431898, 0.759507698 },
4002 { 0.004416e-6, 5223.693919802, 6.028853166 },
4003 /* 691, 700 */
4004 { 0.004088e-6, -7.113547001, 0.060926389 },
4005 { 0.004433e-6, 77713.771467920, 3.627734103 },
4006 { 0.003277e-6, 18849.227549974, 2.327912542 },
4007 { 0.002703e-6, 6062.663207553, 1.271941729 },
4008 { 0.003435e-6, -775.522611324, 0.747446224 },
4009 { 0.002618e-6, 6076.890301554, 3.633715689 },
4010 { 0.003146e-6, 206.185548437, 5.647874613 },
4011 { 0.002544e-6, 1577.343542448, 6.232904270 },
4012 { 0.002218e-6, -220.412642439, 1.309509946 },
4013 { 0.002197e-6, 5856.477659115, 2.407212349 },
4014 /* 701, 710 */
4015 { 0.002897e-6, 5753.384884897, 5.863842246 },
4016 { 0.001766e-6, 426.598190876, 0.754113147 },
4017 { 0.001738e-6, -796.298006816, 2.714942671 },
4018 { 0.001695e-6, 522.577418094, 2.629369842 },
4019 { 0.001584e-6, 5507.553238667, 1.341138229 },
4020 { 0.001503e-6, -242.728603974, 0.377699736 },
4021 { 0.001552e-6, -536.804512095, 2.904684667 },
4022 { 0.001370e-6, -398.149003408, 1.265599125 },
4023 { 0.001889e-6, -5573.142801634, 4.413514859 },
4024 { 0.001722e-6, 6069.776754553, 2.445966339 },
4025 /* 711, 720 */
4026 { 0.001124e-6, 1059.381930189, 5.041799657 },
4027 { 0.001258e-6, 553.569402842, 3.849557278 },
4028 { 0.000831e-6, 951.718406251, 2.471094709 },
4029 { 0.000767e-6, 4694.002954708, 5.363125422 },
4030 { 0.000756e-6, 1349.867409659, 1.046195744 },
4031 { 0.000775e-6, -11.045700264, 0.245548001 },
4032 { 0.000597e-6, 2146.165416475, 4.543268798 },
4033 { 0.000568e-6, 5216.580372801, 4.178853144 },
4034 { 0.000711e-6, 1748.016413067, 5.934271972 },
4035 { 0.000499e-6, 12036.460734888, 0.624434410 },
4036 /* 721, 730 */
4037 { 0.000671e-6, -1194.447010225, 4.136047594 },
4038 { 0.000488e-6, 5849.364112115, 2.209679987 },
4039 { 0.000621e-6, 6438.496249426, 4.518860804 },
4040 { 0.000495e-6, -6286.598968340, 1.868201275 },
4041 { 0.000456e-6, 5230.807466803, 1.271231591 },
4042 { 0.000451e-6, 5088.628839767, 0.084060889 },
4043 { 0.000435e-6, 5643.178563677, 3.324456609 },
4044 { 0.000387e-6, 10977.078804699, 4.052488477 },
4045 { 0.000547e-6, 161000.685737473, 2.841633844 },
4046 { 0.000522e-6, 3154.687084896, 2.171979966 },
4047 /* 731, 740 */
4048 { 0.000375e-6, 5486.777843175, 4.983027306 },
4049 { 0.000421e-6, 5863.591206116, 4.546432249 },
4050 { 0.000439e-6, 7084.896781115, 0.522967921 },
4051 { 0.000309e-6, 2544.314419883, 3.172606705 },
4052 { 0.000347e-6, 4690.479836359, 1.479586566 },
4053 { 0.000317e-6, 801.820931124, 3.553088096 },
4054 { 0.000262e-6, 419.484643875, 0.606635550 },
4055 { 0.000248e-6, 6836.645252834, 3.014082064 },
4056 { 0.000245e-6, -1592.596013633, 5.519526220 },
4057 { 0.000225e-6, 4292.330832950, 2.877956536 },
4058 /* 741, 750 */
4059 { 0.000214e-6, 7234.794256242, 1.605227587 },
4060 { 0.000205e-6, 5767.611978898, 0.625804796 },
4061 { 0.000180e-6, 10447.387839604, 3.499954526 },
4062 { 0.000229e-6, 199.072001436, 5.632304604 },
4063 { 0.000214e-6, 639.897286314, 5.960227667 },
4064 { 0.000175e-6, -433.711737877, 2.162417992 },
4065 { 0.000209e-6, 515.463871093, 2.322150893 },
4066 { 0.000173e-6, 6040.347246017, 2.556183691 },
4067 { 0.000184e-6, 6309.374169791, 4.732296790 },
4068 { 0.000227e-6, 149854.400134205, 5.385812217 },
4069 /* 751, 760 */
4070 { 0.000154e-6, 8031.092263058, 5.120720920 },
4071 { 0.000151e-6, 5739.157790895, 4.815000443 },
4072 { 0.000197e-6, 7632.943259650, 0.222827271 },
4073 { 0.000197e-6, 74.781598567, 3.910456770 },
4074 { 0.000138e-6, 6055.549660552, 1.397484253 },
4075 { 0.000149e-6, -6127.655450557, 5.333727496 },
4076 { 0.000137e-6, 3894.181829542, 4.281749907 },
4077 { 0.000135e-6, 9437.762934887, 5.979971885 },
4078 { 0.000139e-6, -2352.866153772, 4.715630782 },
4079 { 0.000142e-6, 6812.766815086, 0.513330157 },
4080 /* 761, 770 */
4081 { 0.000120e-6, -4705.732307544, 0.194160689 },
4082 { 0.000131e-6, -71430.695617928, 0.000379226 },
4083 { 0.000124e-6, 6279.552731642, 2.122264908 },
4084 { 0.000108e-6, -6256.777530192, 0.883445696 },
4085
4086 /* T^3 */
4087 { 0.143388e-6, 6283.075849991, 1.131453581 },
4088 { 0.006671e-6, 12566.151699983, 0.775148887 },
4089 { 0.001480e-6, 155.420399434, 0.480016880 },
4090 { 0.000934e-6, 213.299095438, 6.144453084 },
4091 { 0.000795e-6, 529.690965095, 2.941595619 },
4092 { 0.000673e-6, 5746.271337896, 0.120415406 },
4093 /* 771, 780 */
4094 { 0.000672e-6, 5760.498431898, 5.317009738 },
4095 { 0.000389e-6, -220.412642439, 3.090323467 },
4096 { 0.000373e-6, 6062.663207553, 3.003551964 },
4097 { 0.000360e-6, 6076.890301554, 1.918913041 },
4098 { 0.000316e-6, -21.340641002, 5.545798121 },
4099 { 0.000315e-6, -242.728603974, 1.884932563 },
4100 { 0.000278e-6, 206.185548437, 1.266254859 },
4101 { 0.000238e-6, -536.804512095, 4.532664830 },
4102 { 0.000185e-6, 522.577418094, 4.578313856 },
4103 { 0.000245e-6, 18849.227549974, 0.587467082 },
4104 /* 781, 787 */
4105 { 0.000180e-6, 426.598190876, 5.151178553 },
4106 { 0.000200e-6, 553.569402842, 5.355983739 },
4107 { 0.000141e-6, 5223.693919802, 1.336556009 },
4108 { 0.000104e-6, 5856.477659115, 4.239842759 },
4109
4110 /* T^4 */
4111 { 0.003826e-6, 6283.075849991, 5.705257275 },
4112 { 0.000303e-6, 12566.151699983, 5.407132842 },
4113 { 0.000209e-6, 155.420399434, 1.989815753 }
4114 };
4115
4116
4117 /* Time since J2000.0 in Julian millennia. */
4118 t = ((date1 - DJ00) + date2) / DJM;
4119
4120 /* ================= */
4121 /* Topocentric terms */
4122 /* ================= */
4123
4124 /* Convert UT to local solar time in radians. */
4125 tsol = fmod(ut, 1.0) * D2PI + elong;
4126
4127 /* FUNDAMENTAL ARGUMENTS: Simon et al. 1994. */
4128
4129 /* Combine time argument (millennia) with deg/arcsec factor. */
4130 w = t / 3600.0;
4131
4132 /* Sun Mean Longitude. */
4133 elsun = fmod(280.46645683 + 1296027711.03429 * w, 360.0) * DD2R;
4134
4135 /* Sun Mean Anomaly. */
4136 emsun = fmod(357.52910918 + 1295965810.481 * w, 360.0) * DD2R;
4137
4138 /* Mean Elongation of Moon from Sun. */
4139 d = fmod(297.85019547 + 16029616012.090 * w, 360.0) * DD2R;
4140
4141 /* Mean Longitude of Jupiter. */
4142 elj = fmod(34.35151874 + 109306899.89453 * w, 360.0) * DD2R;
4143
4144 /* Mean Longitude of Saturn. */
4145 els = fmod(50.07744430 + 44046398.47038 * w, 360.0) * DD2R;
4146
4147 /* TOPOCENTRIC TERMS: Moyer 1981 and Murray 1983. */
4148 wt = + 0.00029e-10 * u * sin(tsol + elsun - els)
4149 + 0.00100e-10 * u * sin(tsol - 2.0 * emsun)
4150 + 0.00133e-10 * u * sin(tsol - d)
4151 + 0.00133e-10 * u * sin(tsol + elsun - elj)
4152 - 0.00229e-10 * u * sin(tsol + 2.0 * elsun + emsun)
4153 - 0.02200e-10 * v * cos(elsun + emsun)
4154 + 0.05312e-10 * u * sin(tsol - emsun)
4155 - 0.13677e-10 * u * sin(tsol + 2.0 * elsun)
4156 - 1.31840e-10 * v * cos(elsun)
4157 + 3.17679e-10 * u * sin(tsol);
4158
4159 /* ===================== */
4160 /* Fairhead et al. model */
4161 /* ===================== */
4162
4163 /* T**0 */
4164 w0 = 0;
4165 for (j = 473; j >= 0; j--) {
4166 w0 += fairhd[j][0] * sin(fairhd[j][1] * t + fairhd[j][2]);
4167 }
4168
4169 /* T**1 */
4170 w1 = 0;
4171 for (j = 678; j >= 474; j--) {
4172 w1 += fairhd[j][0] * sin(fairhd[j][1] * t + fairhd[j][2]);
4173 }
4174
4175 /* T**2 */
4176 w2 = 0;
4177 for (j = 763; j >= 679; j--) {
4178 w2 += fairhd[j][0] * sin(fairhd[j][1] * t + fairhd[j][2]);
4179 }
4180
4181 /* T**3 */
4182 w3 = 0;
4183 for (j = 783; j >= 764; j--) {
4184 w3 += fairhd[j][0] * sin(fairhd[j][1] * t + fairhd[j][2]);
4185 }
4186
4187 /* T**4 */
4188 w4 = 0;
4189 for (j = 786; j >= 784; j--) {
4190 w4 += fairhd[j][0] * sin(fairhd[j][1] * t + fairhd[j][2]);
4191 }
4192
4193 /* Multiply by powers of T and combine. */
4194 wf = t * (t * (t * (t * w4 + w3) + w2) + w1) + w0;
4195
4196 /* Adjustments to use JPL planetary masses instead of IAU. */
4197 wj = 0.00065e-6 * sin(6069.776754 * t + 4.021194) +
4198 0.00033e-6 * sin( 213.299095 * t + 5.543132) +
4199 (-0.00196e-6 * sin(6208.294251 * t + 5.696701)) +
4200 (-0.00173e-6 * sin( 74.781599 * t + 2.435900)) +
4201 0.03638e-6 * t * t;
4202
4203 /* ============ */
4204 /* Final result */
4205 /* ============ */
4206
4207 /* TDB-TT in seconds. */
4208 w = wt + wf + wj;
4209
4210 return w;
4211
4212 }
4213
4214
4215 /**
4216 * The equation of the equinoxes, compatible with IAU 2000 resolutions,
4217 * given the nutation in longitude and the mean obliquity.
4218 *
4219 *<p>This function is derived from the International Astronomical Union's
4220 * SOFA (Standards Of Fundamental Astronomy) software collection.
4221 *
4222 *<p>Status: canonical model.
4223 *
4224 *<!-- Given: -->
4225 * @param date1 double TT as a 2-part Julian Date (Note 1)
4226 * @param date2 double TT as a 2-part Julian Date (Note 1)
4227 * @param epsa double mean obliquity (Note 2)
4228 * @param dpsi double nutation in longitude (Note 3)
4229 *
4230 * <!-- Returned (function value): -->
4231 * @return double equation of the equinoxes (Note 4)
4232 *
4233 * <p>Notes:
4234 * <ol>
4235 *
4236 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
4237 * convenient way between the two arguments. For example,
4238 * JD(TT)=2450123.7 could be expressed in any of these ways,
4239 * among others:
4240 *<pre>
4241 * date1 date2
4242 *
4243 * 2450123.7 0.0 (JD method)
4244 * 2451545.0 -1421.3 (J2000 method)
4245 * 2400000.5 50123.2 (MJD method)
4246 * 2450123.5 0.2 (date & time method)
4247 *</pre>
4248 * The JD method is the most natural and convenient to use in
4249 * cases where the loss of several decimal digits of resolution
4250 * is acceptable. The J2000 method is best matched to the way
4251 * the argument is handled internally and will deliver the
4252 * optimum resolution. The MJD method and the date & time methods
4253 * are both good compromises between resolution and convenience.
4254 *
4255 * <li> The obliquity, in radians, is mean of date.
4256 *
4257 * <li> The result, which is in radians, operates in the following sense:
4258 *
4259 * Greenwich apparent ST = GMST + equation of the equinoxes
4260 *
4261 * <li> The result is compatible with the IAU 2000 resolutions. For
4262 * further details, see IERS Conventions 2003 and Capitaine et al.
4263 * (2002).
4264 *</ol>
4265 *<p>Called:<ul>
4266 * <li>{@link #jauEect00} equation of the equinoxes complementary terms
4267 * </ul>
4268 *
4269 *
4270 * <p>Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
4271 * implement the IAU 2000 definition of UT1", Astronomy &
4272 * Astrophysics, 406, 1135-1149 (2003)
4273 *
4274 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
4275 * IERS Technical Note No. 32, BKG (2004)
4276 *
4277 *@version 2008 May 16
4278 *
4279 * @since Release 20101201
4280 *
4281 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
4282 */
4283 public static double jauEe00(double date1, double date2, double epsa, double dpsi)
4284 {
4285 double ee;
4286
4287
4288 /* Equation of the equinoxes. */
4289 ee = dpsi * cos(epsa) + jauEect00(date1, date2);
4290
4291 return ee;
4292
4293 }
4294
4295
4296 /**
4297 * Equation of the equinoxes, compatible with IAU 2000 resolutions.
4298 *
4299 *<p>This function is derived from the International Astronomical Union's
4300 * SOFA (Standards Of Fundamental Astronomy) software collection.
4301 *
4302 *<p>Status: support function.
4303 *
4304 *<!-- Given: -->
4305 * @param date1 double TT as a 2-part Julian Date (Note 1)
4306 * @param date2 double TT as a 2-part Julian Date (Note 1)
4307 *
4308 * <!-- Returned (function value): -->
4309 * @return double equation of the equinoxes (Note 2)
4310 *
4311 * <p>Notes:
4312 * <ol>
4313 *
4314 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
4315 * convenient way between the two arguments. For example,
4316 * JD(TT)=2450123.7 could be expressed in any of these ways,
4317 * among others:
4318 *<pre>
4319 * date1 date2
4320 *
4321 * 2450123.7 0.0 (JD method)
4322 * 2451545.0 -1421.3 (J2000 method)
4323 * 2400000.5 50123.2 (MJD method)
4324 * 2450123.5 0.2 (date & time method)
4325 *</pre>
4326 * The JD method is the most natural and convenient to use in
4327 * cases where the loss of several decimal digits of resolution
4328 * is acceptable. The J2000 method is best matched to the way
4329 * the argument is handled internally and will deliver the
4330 * optimum resolution. The MJD method and the date & time methods
4331 * are both good compromises between resolution and convenience.
4332 *
4333 * <li> The result, which is in radians, operates in the following sense:
4334 *
4335 * Greenwich apparent ST = GMST + equation of the equinoxes
4336 *
4337 * <li> The result is compatible with the IAU 2000 resolutions. For
4338 * further details, see IERS Conventions 2003 and Capitaine et al.
4339 * (2002).
4340 *</ol>
4341 *<p>Called:<ul>
4342 * <li>{@link #jauPr00} IAU 2000 precession adjustments
4343 * <li>{@link #jauObl80} mean obliquity, IAU 1980
4344 * <li>{@link #jauNut00a} nutation, IAU 2000A
4345 * <li>{@link #jauEe00} equation of the equinoxes, IAU 2000
4346 * </ul>
4347 *<p>References:
4348 *
4349 * <p>Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
4350 * implement the IAU 2000 definition of UT1", Astronomy &
4351 * Astrophysics, 406, 1135-1149 (2003).
4352 *
4353 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
4354 * IERS Technical Note No. 32, BKG (2004).
4355 *
4356 *@version 2008 May 16
4357 *
4358 * @since Release 20101201
4359 *
4360 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
4361 */
4362 public static double jauEe00a(double date1, double date2)
4363 {
4364 double epsa, ee;
4365
4366
4367 /* IAU 2000 precession-rate adjustments. */
4368 PrecessionDeltaTerms nutd = jauPr00(date1, date2);
4369
4370 /* Mean obliquity, consistent with IAU 2000 precession-nutation. */
4371 epsa = jauObl80(date1, date2) + nutd.depspr;
4372
4373 /* Nutation in longitude. */
4374 NutationTerms nut = jauNut00a(date1, date2);
4375
4376 /* Equation of the equinoxes. */
4377 ee = jauEe00(date1, date2, epsa, nut.dpsi);
4378
4379 return ee;
4380
4381 }
4382
4383
4384 /**
4385 * Equation of the equinoxes, compatible with IAU 2000 resolutions but
4386 * using the truncated nutation model IAU 2000B.
4387 *
4388 *<p>This function is derived from the International Astronomical Union's
4389 * SOFA (Standards Of Fundamental Astronomy) software collection.
4390 *
4391 *<p>Status: support function.
4392 *
4393 *<!-- Given: -->
4394 * @param date1 double TT as a 2-part Julian Date (Note 1)
4395 * @param date2 double TT as a 2-part Julian Date (Note 1)
4396 *
4397 * <!-- Returned (function value): -->
4398 * @return double equation of the equinoxes (Note 2)
4399 *
4400 * <p>Notes:
4401 * <ol>
4402 *
4403 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
4404 * convenient way between the two arguments. For example,
4405 * JD(TT)=2450123.7 could be expressed in any of these ways,
4406 * among others:
4407 *<pre>
4408 * date1 date2
4409 *
4410 * 2450123.7 0.0 (JD method)
4411 * 2451545.0 -1421.3 (J2000 method)
4412 * 2400000.5 50123.2 (MJD method)
4413 * 2450123.5 0.2 (date & time method)
4414 *</pre>
4415 * The JD method is the most natural and convenient to use in
4416 * cases where the loss of several decimal digits of resolution
4417 * is acceptable. The J2000 method is best matched to the way
4418 * the argument is handled internally and will deliver the
4419 * optimum resolution. The MJD method and the date & time methods
4420 * are both good compromises between resolution and convenience.
4421 *
4422 * <li> The result, which is in radians, operates in the following sense:
4423 *
4424 * Greenwich apparent ST = GMST + equation of the equinoxes
4425 *
4426 * <li> The result is compatible with the IAU 2000 resolutions except
4427 * that accuracy has been compromised for the sake of speed. For
4428 * further details, see McCarthy & Luzum (2001), IERS Conventions
4429 * 2003 and Capitaine et al. (2003).
4430 *</ol>
4431 *<p>Called:<ul>
4432 * <li>{@link #jauPr00} IAU 2000 precession adjustments
4433 * <li>{@link #jauObl80} mean obliquity, IAU 1980
4434 * <li>{@link #jauNut00b} nutation, IAU 2000B
4435 * <li>{@link #jauEe00} equation of the equinoxes, IAU 2000
4436 * </ul>
4437 *
4438 *
4439 * <p>Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
4440 * implement the IAU 2000 definition of UT1", Astronomy &
4441 * Astrophysics, 406, 1135-1149 (2003)
4442 *
4443 * <p>McCarthy, D.D. & Luzum, B.J., "An abridged model of the
4444 * precession-nutation of the celestial pole", Celestial Mechanics &
4445 * Dynamical Astronomy, 85, 37-49 (2003)
4446 *
4447 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
4448 * IERS Technical Note No. 32, BKG (2004)
4449 *
4450 *@version 2008 May 18
4451 *
4452 * @since Release 20101201
4453 *
4454 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
4455 */
4456 public static double jauEe00b(double date1, double date2)
4457 {
4458 double ee;
4459
4460
4461 /* IAU 2000 precession-rate adjustments. */
4462 PrecessionDeltaTerms nutd = jauPr00(date1, date2);
4463
4464 /* Mean obliquity, consistent with IAU 2000 precession-nutation. */
4465 double epsa = jauObl80(date1, date2) + nutd.depspr;
4466
4467 /* Nutation in longitude. dpsi, deps*/
4468 NutationTerms nut = jauNut00b(date1, date2 );
4469
4470 /* Equation of the equinoxes. */
4471 ee = jauEe00(date1, date2, epsa, nut.dpsi);
4472
4473 return ee;
4474
4475 }
4476
4477 /**
4478 * Equation of the equinoxes, compatible with IAU 2000 resolutions and
4479 * IAU 2006/2000A precession-nutation.
4480 *
4481 *<p>This function is derived from the International Astronomical Union's
4482 * SOFA (Standards Of Fundamental Astronomy) software collection.
4483 *
4484 *<p>Status: support function.
4485 *
4486 *<!-- Given: -->
4487 * @param date1 double TT as a 2-part Julian Date (Note 1)
4488 * @param date2 double TT as a 2-part Julian Date (Note 1)
4489 *
4490 * <!-- Returned (function value): -->
4491 * @return double equation of the equinoxes (Note 2)
4492 *
4493 * <p>Notes:
4494 * <ol>
4495 *
4496 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
4497 * convenient way between the two arguments. For example,
4498 * JD(TT)=2450123.7 could be expressed in any of these ways,
4499 * among others:
4500 *<pre>
4501 * date1 date2
4502 *
4503 * 2450123.7 0.0 (JD method)
4504 * 2451545.0 -1421.3 (J2000 method)
4505 * 2400000.5 50123.2 (MJD method)
4506 * 2450123.5 0.2 (date & time method)
4507 *</pre>
4508 * The JD method is the most natural and convenient to use in
4509 * cases where the loss of several decimal digits of resolution
4510 * is acceptable. The J2000 method is best matched to the way
4511 * the argument is handled internally and will deliver the
4512 * optimum resolution. The MJD method and the date & time methods
4513 * are both good compromises between resolution and convenience.
4514 *
4515 * <li> The result, which is in radians, operates in the following sense:
4516 *
4517 * Greenwich apparent ST = GMST + equation of the equinoxes
4518 *</ol>
4519 *<p>Called:<ul>
4520 * <li>{@link #jauAnpm} normalize angle into range +/- pi
4521 * <li>{@link #jauGst06a} Greenwich apparent sidereal time, IAU 2006/2000A
4522 * <li>{@link #jauGmst06} Greenwich mean sidereal time, IAU 2006
4523 * </ul>
4524 *<p>Reference:
4525 *
4526 * <p>McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003),
4527 * IERS Technical Note No. 32, BKG
4528 *
4529 *@version 2008 May 18
4530 *
4531 * @since Release 20101201
4532 *
4533 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
4534 */
4535 public static double jauEe06a(double date1, double date2)
4536 {
4537 double gst06a, gmst06, ee;
4538
4539
4540 /* Apparent and mean sidereal times. */
4541 gst06a = jauGst06a(0.0, 0.0, date1, date2);
4542 gmst06 = jauGmst06(0.0, 0.0, date1, date2);
4543
4544 /* Equation of the equinoxes. */
4545 ee = jauAnpm(gst06a - gmst06);
4546
4547 return ee;
4548
4549 }
4550
4551 private static class TERM {
4552 final int nfa[]; /* coefficients of l,l',F,D,Om,LVe,LE,pA */
4553 final double s, c; /* sine and cosine coefficients */
4554 public TERM(int nfa[], double s, double c) {
4555 this.nfa = nfa;
4556 this.s = s;
4557 this.c = c;
4558 }
4559
4560 }
4561
4562
4563 /**
4564 * Equation of the equinoxes complementary terms, consistent with
4565 * IAU 2000 resolutions.
4566 *
4567 *<p>This function is derived from the International Astronomical Union's
4568 * SOFA (Standards Of Fundamental Astronomy) software collection.
4569 *
4570 *<p>Status: canonical model.
4571 *
4572 *<!-- Given: -->
4573 * @param date1 double TT as a 2-part Julian Date (Note 1)
4574 * @param date2 double TT as a 2-part Julian Date (Note 1)
4575 *
4576 * <!-- Returned (function value): -->
4577 * @return double complementary terms (Note 2)
4578 *
4579 * <p>Notes:
4580 * <ol>
4581 *
4582 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
4583 * convenient way between the two arguments. For example,
4584 * JD(TT)=2450123.7 could be expressed in any of these ways,
4585 * among others:
4586 *<pre>
4587 * date1 date2
4588 *
4589 * 2450123.7 0.0 (JD method)
4590 * 2451545.0 -1421.3 (J2000 method)
4591 * 2400000.5 50123.2 (MJD method)
4592 * 2450123.5 0.2 (date & time method)
4593 *</pre>
4594 * The JD method is the most natural and convenient to use in
4595 * cases where the loss of several decimal digits of resolution
4596 * is acceptable. The J2000 method is best matched to the way
4597 * the argument is handled internally and will deliver the
4598 * optimum resolution. The MJD method and the date & time methods
4599 * are both good compromises between resolution and convenience.
4600 *
4601 * <li> The "complementary terms" are part of the equation of the
4602 * equinoxes (EE), classically the difference between apparent and
4603 * mean Sidereal Time:
4604 *
4605 * GAST = GMST + EE
4606 *
4607 * with:
4608 *
4609 * EE = dpsi * cos(eps)
4610 *
4611 * where dpsi is the nutation in longitude and eps is the obliquity
4612 * of date. However, if the rotation of the Earth were constant in
4613 * an inertial frame the classical formulation would lead to
4614 * apparent irregularities in the UT1 timescale traceable to side-
4615 * effects of precession-nutation. In order to eliminate these
4616 * effects from UT1, "complementary terms" were introduced in 1994
4617 * (IAU, 1994) and took effect from 1997 (Capitaine and Gontier,
4618 * <li>:
4619 *
4620 * GAST = GMST + CT + EE
4621 *
4622 * By convention, the complementary terms are included as part of
4623 * the equation of the equinoxes rather than as part of the mean
4624 * Sidereal Time. This slightly compromises the "geometrical"
4625 * interpretation of mean sidereal time but is otherwise
4626 * inconsequential.
4627 *
4628 * The present function computes CT in the above expression,
4629 * compatible with IAU 2000 resolutions (Capitaine et al., 2002, and
4630 * IERS Conventions 2003).
4631 *</ol>
4632 *<p>Called:<ul>
4633 * <li>{@link #jauFal03} mean anomaly of the Moon
4634 * <li>{@link #jauFalp03} mean anomaly of the Sun
4635 * <li>{@link #jauFaf03} mean argument of the latitude of the Moon
4636 * <li>{@link #jauFad03} mean elongation of the Moon from the Sun
4637 * <li>{@link #jauFaom03} mean longitude of the Moon's ascending node
4638 * <li>{@link #jauFave03} mean longitude of Venus
4639 * <li>{@link #jauFae03} mean longitude of Earth
4640 * <li>{@link #jauFapa03} general accumulated precession in longitude
4641 * </ul>
4642 *<p>References:
4643 *
4644 * <p>Capitaine, N. & Gontier, A.-M., Astron. Astrophys., 275,
4645 * 645-650 (1993)
4646 *
4647 * <p>Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
4648 * implement the IAU 2000 definition of UT1", Astronomy &
4649 * Astrophysics, 406, 1135-1149 (2003)
4650 *
4651 * <p>IAU Resolution C7, Recommendation 3 (1994)
4652 *
4653 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
4654 * IERS Technical Note No. 32, BKG (2004)
4655 *
4656 *@version 2009 December 17
4657 *
4658 * @since Release 20101201
4659 *
4660 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
4661 */
4662 public static double jauEect00(double date1, double date2)
4663 {
4664 /* Time since J2000.0, in Julian centuries */
4665 double t;
4666
4667 /* Miscellaneous */
4668 int i, j;
4669 double a, s0, s1;
4670
4671 /* Fundamental arguments */
4672 double fa[] = new double[14];
4673
4674 /* Returned value. */
4675 double eect;
4676
4677 /* ----------------------------------------- */
4678 /* The series for the EE complementary terms */
4679 /* ----------------------------------------- */
4680
4681
4682 /* Terms of order t^0 */
4683 final TERM e0[] = {
4684
4685 /* 1-10 */
4686 new TERM(new int[]{ 0, 0, 0, 0, 1, 0, 0, 0}, 2640.96e-6, -0.39e-6 ),
4687 new TERM(new int[]{ 0, 0, 0, 0, 2, 0, 0, 0}, 63.52e-6, -0.02e-6 ),
4688 new TERM(new int[]{ 0, 0, 2, -2, 3, 0, 0, 0}, 11.75e-6, 0.01e-6 ),
4689 new TERM(new int[]{ 0, 0, 2, -2, 1, 0, 0, 0}, 11.21e-6, 0.01e-6 ),
4690 new TERM(new int[]{ 0, 0, 2, -2, 2, 0, 0, 0}, -4.55e-6, 0.00e-6 ),
4691 new TERM(new int[]{ 0, 0, 2, 0, 3, 0, 0, 0}, 2.02e-6, 0.00e-6 ),
4692 new TERM(new int[]{ 0, 0, 2, 0, 1, 0, 0, 0}, 1.98e-6, 0.00e-6 ),
4693 new TERM(new int[]{ 0, 0, 0, 0, 3, 0, 0, 0}, -1.72e-6, 0.00e-6 ),
4694 new TERM(new int[]{ 0, 1, 0, 0, 1, 0, 0, 0}, -1.41e-6, -0.01e-6 ),
4695 new TERM(new int[]{ 0, 1, 0, 0, -1, 0, 0, 0}, -1.26e-6, -0.01e-6 ),
4696
4697 /* 11-20 */
4698 new TERM(new int[]{ 1, 0, 0, 0, -1, 0, 0, 0}, -0.63e-6, 0.00e-6 ),
4699 new TERM(new int[]{ 1, 0, 0, 0, 1, 0, 0, 0}, -0.63e-6, 0.00e-6 ),
4700 new TERM(new int[]{ 0, 1, 2, -2, 3, 0, 0, 0}, 0.46e-6, 0.00e-6 ),
4701 new TERM(new int[]{ 0, 1, 2, -2, 1, 0, 0, 0}, 0.45e-6, 0.00e-6 ),
4702 new TERM(new int[]{ 0, 0, 4, -4, 4, 0, 0, 0}, 0.36e-6, 0.00e-6 ),
4703 new TERM(new int[]{ 0, 0, 1, -1, 1, -8, 12, 0}, -0.24e-6, -0.12e-6 ),
4704 new TERM(new int[]{ 0, 0, 2, 0, 0, 0, 0, 0}, 0.32e-6, 0.00e-6 ),
4705 new TERM(new int[]{ 0, 0, 2, 0, 2, 0, 0, 0}, 0.28e-6, 0.00e-6 ),
4706 new TERM(new int[]{ 1, 0, 2, 0, 3, 0, 0, 0}, 0.27e-6, 0.00e-6 ),
4707 new TERM(new int[]{ 1, 0, 2, 0, 1, 0, 0, 0}, 0.26e-6, 0.00e-6 ),
4708
4709 /* 21-30 */
4710 new TERM(new int[]{ 0, 0, 2, -2, 0, 0, 0, 0}, -0.21e-6, 0.00e-6 ),
4711 new TERM(new int[]{ 0, 1, -2, 2, -3, 0, 0, 0}, 0.19e-6, 0.00e-6 ),
4712 new TERM(new int[]{ 0, 1, -2, 2, -1, 0, 0, 0}, 0.18e-6, 0.00e-6 ),
4713 new TERM(new int[]{ 0, 0, 0, 0, 0, 8,-13, -1}, -0.10e-6, 0.05e-6 ),
4714 new TERM(new int[]{ 0, 0, 0, 2, 0, 0, 0, 0}, 0.15e-6, 0.00e-6 ),
4715 new TERM(new int[]{ 2, 0, -2, 0, -1, 0, 0, 0}, -0.14e-6, 0.00e-6 ),
4716 new TERM(new int[]{ 1, 0, 0, -2, 1, 0, 0, 0}, 0.14e-6, 0.00e-6 ),
4717 new TERM(new int[]{ 0, 1, 2, -2, 2, 0, 0, 0}, -0.14e-6, 0.00e-6 ),
4718 new TERM(new int[]{ 1, 0, 0, -2, -1, 0, 0, 0}, 0.14e-6, 0.00e-6 ),
4719 new TERM(new int[]{ 0, 0, 4, -2, 4, 0, 0, 0}, 0.13e-6, 0.00e-6 ),
4720
4721 /* 31-33 */
4722 new TERM(new int[]{ 0, 0, 2, -2, 4, 0, 0, 0}, -0.11e-6, 0.00e-6 ),
4723 new TERM(new int[]{ 1, 0, -2, 0, -3, 0, 0, 0}, 0.11e-6, 0.00e-6 ),
4724 new TERM(new int[]{ 1, 0, -2, 0, -1, 0, 0, 0}, 0.11e-6, 0.00e-6 )
4725 };
4726
4727 /* Terms of order t^1 */
4728 final TERM e1[] = {
4729 new TERM(new int[]{ 0, 0, 0, 0, 1, 0, 0, 0}, -0.87e-6, 0.00e-6 )
4730 };
4731
4732 /* Number of terms in the series */
4733 final int NE0 = e0.length;
4734 final int NE1 = e1.length;
4735
4736 /*--------------------------------------------------------------------*/
4737
4738 /* Interval between fundamental epoch J2000.0 and current date (JC). */
4739 t = ((date1 - DJ00) + date2) / DJC;
4740
4741 /* Fundamental Arguments (from IERS Conventions 2003) */
4742
4743 /* Mean anomaly of the Moon. */
4744 fa[0] = jauFal03(t);
4745
4746 /* Mean anomaly of the Sun. */
4747 fa[1] = jauFalp03(t);
4748
4749 /* Mean longitude of the Moon minus that of the ascending node. */
4750 fa[2] = jauFaf03(t);
4751
4752 /* Mean elongation of the Moon from the Sun. */
4753 fa[3] = jauFad03(t);
4754
4755 /* Mean longitude of the ascending node of the Moon. */
4756 fa[4] = jauFaom03(t);
4757
4758 /* Mean longitude of Venus. */
4759 fa[5] = jauFave03(t);
4760
4761 /* Mean longitude of Earth. */
4762 fa[6] = jauFae03(t);
4763
4764 /* General precession in longitude. */
4765 fa[7] = jauFapa03(t);
4766
4767 /* Evaluate the EE complementary terms. */
4768 s0 = 0.0;
4769 s1 = 0.0;
4770
4771 for (i = NE0-1; i >= 0; i--) {
4772 a = 0.0;
4773 for (j = 0; j < 8; j++) {
4774 a += (double)(e0[i].nfa[j]) * fa[j];
4775 }
4776 s0 += e0[i].s * sin(a) + e0[i].c * cos(a);
4777 }
4778
4779 for (i = NE1-1; i >= 0; i--) {
4780 a = 0.0;
4781 for (j = 0; j < 8; j++) {
4782 a += (double)(e1[i].nfa[j]) * fa[j];
4783 }
4784 s1 += e1[i].s * sin(a) + e1[i].c * cos(a);
4785 }
4786
4787 eect = (s0 + s1 * t ) * DAS2R;
4788
4789 return eect;
4790
4791 }
4792
4793 /**
4794 * Reference Ellipsoid of Earth.
4795 *
4796 * The ellipsoid parameters are returned in the form of equatorial
4797 * radius in meters (a) and flattening (f). The latter is a number
4798 * around 0.00335, i.e. around 1/298.
4799 *
4800 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 1 Feb 2010
4801 *
4802 * @since AIDA Stage 1
4803 */
4804 public static class ReferenceEllipsoid{
4805 /** equatorial radius (meters, Note 2) */
4806 public double a;
4807 /** flattening (Note 2) */
4808 public double f ;
4809 public ReferenceEllipsoid(double a, double f ) {
4810 this.a = a;
4811 this.f = f;
4812 }
4813 }
4814 /**
4815 * Earth reference ellipsoids.
4816 *
4817 *<p>This function is derived from the International Astronomical Union's
4818 * JSOFA (Standards of Fundamental Astronomy) software collection.
4819 *
4820 *<p>Status: canonical.
4821 *
4822 *<!-- Given: -->
4823 * @param n int ellipsoid identifier (Note 1)
4824 *
4825 *<!-- Returned: -->
4826 * @return a double <u>returned</u> equatorial radius (meters, Note 2)
4827 * f double <u>returned</u> flattening (Note 2)
4828 *
4829 * <!-- Returned (function value): -->
4830 * @throws JSOFAIllegalParameter int status:
4831 * 0 = OK
4832 * -1 = illegal identifier (Note 3)
4833 *
4834 * <p>Notes:
4835 * <ol>
4836 *
4837 * <li> The identifier n is a number that specifies the choice of
4838 * reference ellipsoid. The following are supported:
4839 *
4840 * n ellipsoid
4841 *
4842 * 1 WGS84
4843 * 2 GRS80
4844 * 3 WGS72
4845 *
4846 * The number n has no significance outside the JSOFA software.
4847 *
4848 * <li> The ellipsoid parameters are returned in the form of equatorial
4849 * radius in meters (a) and flattening (f). The latter is a number
4850 * around 0.00335, i.e. around 1/298.
4851 *
4852 * <li> For the case where an unsupported n value is supplied, zero a and
4853 * f are returned, as well as error status.
4854 *</ol>
4855 *<p>References:
4856 *
4857 * <p>Department of Defense World Geodetic System 1984, National
4858 * Imagery and Mapping Agency Technical Report 8350.2, Third
4859 * Edition, p3-2.
4860 *
4861 * <p>Moritz, H., Bull. Geodesique 66-2, 187 (1992).
4862 *
4863 * <p>The Department of Defense World Geodetic System 1972, World
4864 * Geodetic System Committee, May 1974.
4865 *
4866 * <p>Explanatory Supplement to the Astronomical Almanac,
4867 * P. Kenneth Seidelmann (ed), University Science Books (1992),
4868 * p220.
4869 *
4870 *@version 2010 January 18
4871 *
4872 * @since Release 20101201
4873 *
4874 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
4875 */
4876 public static ReferenceEllipsoid jauEform ( int n ) throws JSOFAIllegalParameter
4877 {
4878 double a,f;
4879 /* Look up a and f for the specified reference ellipsoid. */
4880 switch ( n ) {
4881 case 1:
4882
4883 /* WGS84. */
4884 a = 6378137.0;
4885 f = 1.0 / 298.257223563;
4886 break;
4887
4888 case 2:
4889
4890 /* GRS80. */
4891 a = 6378137.0;
4892 f = 1.0 / 298.257222101;
4893 break;
4894
4895 case 3:
4896
4897 /* WGS72. */
4898 a = 6378135.0;
4899 f = 1.0 / 298.26;
4900 break;
4901
4902 default:
4903
4904 /* Invalid identifier. */
4905 a = 0.0;
4906 f = 0.0;
4907 throw new JSOFAIllegalParameter("illegal ellipsoid identifier", -1);
4908
4909 }
4910
4911 /* OK status. */
4912 return new ReferenceEllipsoid(a, f);
4913
4914
4915 }
4916
4917
4918 /**
4919 * Equation of the origins, IAU 2006 precession and IAU 2000A nutation.
4920 *
4921 *<p>This function is derived from the International Astronomical Union's
4922 * SOFA (Standards Of Fundamental Astronomy) software collection.
4923 *
4924 *<p>Status: support function.
4925 *
4926 *<!-- Given: -->
4927 * @param date1 double TT as a 2-part Julian Date (Note 1)
4928 * @param date2 double TT as a 2-part Julian Date (Note 1)
4929 *
4930 * <!-- Returned (function value): -->
4931 * @return double equation of the origins in radians
4932 *
4933 * <p>Notes:
4934 * <ol>
4935 *
4936 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
4937 * convenient way between the two arguments. For example,
4938 * JD(TT)=2450123.7 could be expressed in any of these ways,
4939 * among others:
4940 *<pre>
4941 * date1 date2
4942 *
4943 * 2450123.7 0.0 (JD method)
4944 * 2451545.0 -1421.3 (J2000 method)
4945 * 2400000.5 50123.2 (MJD method)
4946 * 2450123.5 0.2 (date & time method)
4947 *</pre>
4948 * The JD method is the most natural and convenient to use in
4949 * cases where the loss of several decimal digits of resolution
4950 * is acceptable. The J2000 method is best matched to the way
4951 * the argument is handled internally and will deliver the
4952 * optimum resolution. The MJD method and the date & time methods
4953 * are both good compromises between resolution and convenience.
4954 *
4955 * <li> The equation of the origins is the distance between the true
4956 * equinox and the celestial intermediate origin and, equivalently,
4957 * the difference between Earth rotation angle and Greenwich
4958 * apparent sidereal time (ERA-GST). It comprises the precession
4959 * (since J2000.0) in right ascension plus the equation of the
4960 * equinoxes (including the small correction terms).
4961 *</ol>
4962 *<p>Called:<ul>
4963 * <li>{@link #jauPnm06a} classical NPB matrix, IAU 2006/2000A
4964 * <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
4965 * <li>{@link #jauS06} the CIO locator s, given X,Y, IAU 2006
4966 * <li>{@link #jauEors} equation of the origins, Given NPB matrix and s
4967 * </ul>
4968 *<p>References:
4969 *
4970 * <p>Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855
4971 *
4972 * <p>Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981
4973 *
4974 *@version 2008 May 16
4975 *
4976 * @since Release 20101201
4977 *
4978 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
4979 */
4980 public static double jauEo06a(double date1, double date2)
4981 {
4982 double r[][], s, eo;
4983
4984
4985 /* Classical nutation x precession x bias matrix. */
4986 r = jauPnm06a(date1, date2);
4987
4988 /* Extract CIP coordinates. */
4989 CelestialIntermediatePole cip = jauBpn2xy(r);
4990
4991 /* The CIO locator, s. */
4992 s = jauS06(date1, date2, cip.x, cip.y);
4993
4994 /* Solve for the EO. */
4995 eo = jauEors(r, s);
4996
4997 return eo;
4998
4999 }
5000
5001
5002 /**
5003 * Equation of the origins, given the classical NPB matrix and the
5004 * quantity s.
5005 *
5006 *<p>This function is derived from the International Astronomical Union's
5007 * SOFA (Standards Of Fundamental Astronomy) software collection.
5008 *
5009 *<p>Status: support function.
5010 *
5011 *<!-- Given: -->
5012 * @param rnpb double[3][3] classical nutation x precession x bias matrix
5013 * @param s double the quantity s (the CIO locator)
5014 *
5015 * <!-- Returned (function value): -->
5016 * @return double the equation of the origins in radians.
5017 *
5018 * <p>Notes:
5019 * <ol>
5020 *
5021 * <li> The equation of the origins is the distance between the true
5022 * equinox and the celestial intermediate origin and, equivalently,
5023 * the difference between Earth rotation angle and Greenwich
5024 * apparent sidereal time (ERA-GST). It comprises the precession
5025 * (since J2000.0) in right ascension plus the equation of the
5026 * equinoxes (including the small correction terms).
5027 *
5028 * <li> The algorithm is from Wallace & Capitaine (2006).
5029 *</ol>
5030 * References:
5031 *
5032 * <p>Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855
5033 *
5034 * <p>Wallace, P. & Capitaine, N., 2006, Astron.Astrophys. 459, 981
5035 *
5036 *@version 2008 May 26
5037 *
5038 * @since Release 20101201
5039 *
5040 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
5041 */
5042 public static double jauEors(double rnpb[][], double s)
5043 {
5044 double x, ax, xs, ys, zs, p, q, eo;
5045
5046
5047 /* Evaluate Wallace & Capitaine (2006) expression (16). */
5048 x = rnpb[2][0];
5049 ax = x / (1.0 + rnpb[2][2]);
5050 xs = 1.0 - ax * x;
5051 ys = -ax * rnpb[2][1];
5052 zs = -x;
5053 p = rnpb[0][0] * xs + rnpb[0][1] * ys + rnpb[0][2] * zs;
5054 q = rnpb[1][0] * xs + rnpb[1][1] * ys + rnpb[1][2] * zs;
5055 eo = ((p != 0) || (q != 0)) ? s - atan2(q, p) : s;
5056
5057 return eo;
5058
5059 }
5060
5061
5062 /**
5063 * Julian Date to Besselian Epoch.
5064 *
5065 *<p>This function is derived from the International Astronomical Union's
5066 * SOFA (Standards Of Fundamental Astronomy) software collection.
5067 *
5068 *<p>Status: support function.
5069 *
5070 *<!-- Given: -->
5071 * @param dj1 double Julian Date (see note)
5072 * @param dj2 double Julian Date (see note)
5073 *
5074 * <!-- Returned (function value): -->
5075 * @return double Besselian Epoch.
5076 *
5077 * Note:
5078 *
5079 * The Julian Date is supplied in two pieces, in the usual JSOFA
5080 * manner, which is designed to preserve time resolution. The
5081 * Julian Date is available as a single number by adding dj1 and
5082 * dj2. The maximum resolution is achieved if dj1 is 2451545D0
5083 * (J2000.0).
5084 *
5085 *<p>Reference:
5086 *
5087 * Lieske,J.H., 1979. Astron.Astrophys.,73,282.
5088 *
5089 *@version 2009 December 16
5090 *
5091 * @since Release 20101201
5092 *
5093 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
5094 */
5095 public static double jauEpb(double dj1, double dj2)
5096 {
5097 /* J2000.0 minus B1900.0 (2415019.81352) in Julian days */
5098 final double D1900 = 36524.68648;
5099
5100 return 1900.0 + ((dj1 - DJ00) + (dj2 + D1900)) / DTY;
5101
5102 }
5103
5104 /**
5105 * Besselian Epoch to Julian Date.
5106 *
5107 *<p>This function is derived from the International Astronomical Union's
5108 * SOFA (Standards Of Fundamental Astronomy) software collection.
5109 *
5110 *<p>Status: support function.
5111 *
5112 *<!-- Given: -->
5113 * @param epb double Besselian Epoch (e.g. 1957.3D0)
5114 *
5115 *<!-- Returned: -->
5116 * @return MJD zero-point: always 2400000.5 Modified Julian Date
5117 *
5118 * Note:
5119 *
5120 * The Julian Date is returned in two pieces, in the usual JSOFA
5121 * manner, which is designed to preserve time resolution. The
5122 * Julian Date is available as a single number by adding djm0 and
5123 * djm.
5124 *
5125 *<p>Reference:
5126 *
5127 * <p>Lieske, J.H., 1979, Astron.Astrophys. 73, 282.
5128 *
5129 *@version 2008 May 24
5130 *
5131 * @since Release 20101201
5132 *
5133 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
5134 */
5135 public static JulianDate jauEpb2jd(double epb)
5136 {
5137 double djm0, djm;
5138 djm0 = 2400000.5;
5139 djm = 15019.81352 + (epb - 1900.0) * DTY;
5140
5141 return new JulianDate(djm0, djm);
5142
5143 }
5144
5145
5146 /**
5147 * Julian Date to Julian Epoch.
5148 *
5149 *<p>This function is derived from the International Astronomical Union's
5150 * SOFA (Standards Of Fundamental Astronomy) software collection.
5151 *
5152 *<p>Status: support function.
5153 *
5154 *<!-- Given: -->
5155 * @param dj1 double Julian Date (see note)
5156 * @param dj2 double Julian Date (see note)
5157 *
5158 * <!-- Returned (function value): -->
5159 * @return double Julian Epoch
5160 *
5161 * Note:
5162 *
5163 * The Julian Date is supplied in two pieces, in the usual JSOFA
5164 * manner, which is designed to preserve time resolution. The
5165 * Julian Date is available as a single number by adding dj1 and
5166 * dj2. The maximum resolution is achieved if dj1 is 2451545D0
5167 * (J2000.0).
5168 *
5169 *<p>Reference:
5170 *
5171 * <p>Lieske, J.H., 1979, Astron.Astrophys. 73, 282.
5172 *
5173 *@version 2009 December 16
5174 *
5175 * @since Release 20101201
5176 *
5177 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
5178 */
5179 public static double jauEpj(double dj1, double dj2)
5180 {
5181 return 2000.0 + ((dj1 - DJ00) + dj2) / DJY;
5182
5183 }
5184
5185
5186 /**
5187 * Julian Epoch to Julian Date.
5188 *
5189 *<p>This function is derived from the International Astronomical Union's
5190 * SOFA (Standards Of Fundamental Astronomy) software collection.
5191 *
5192 *<p>Status: support function.
5193 *
5194 *<!-- Given: -->
5195 * @param epj double Julian Epoch (e.g. 1996.8D0)
5196 *
5197 *<!-- Returned: -->
5198 * @return MJD zero-point: always 2400000.5 Modified Julian Date
5199 *
5200 * Note:
5201 *
5202 * The Julian Date is returned in two pieces, in the usual JSOFA
5203 * manner, which is designed to preserve time resolution. The
5204 * Julian Date is available as a single number by adding djm0 and
5205 * djm.
5206 *
5207 *<p>Reference:
5208 *
5209 * <p>Lieske, J.H., 1979, Astron.Astrophys. 73, 282.
5210 *
5211 *@version 2008 May 11
5212 *
5213 * @since Release 20101201
5214 *
5215 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
5216 */
5217 public static JulianDate jauEpj2jd(double epj)
5218 {
5219 double djm0, djm;
5220 djm0 = 2400000.5;
5221 djm = 51544.5 + (epj - 2000.0) * 365.25;
5222
5223 return new JulianDate(djm0, djm);
5224
5225 }
5226
5227
5228 /*
5229 * A utility class to get round 65536 byte limit on functions in java - The static initializer is too large on its own. - So split into two classes for no real semantic reason
5230 */
5231 static private final class Ephemeris extends SSB {
5232
5233
5234 /**
5235 * ----------------------
5236 * Ephemeris Coefficients
5237 * ----------------------
5238 *
5239 * The ephemeris consists of harmonic terms for predicting (i) the Sun
5240 * to Earth vector and (ii) the Solar-System-barycenter to Sun vector
5241 * respectively. The coefficients are stored in arrays which, although
5242 * 1-demensional, contain groups of three. Each triplet of
5243 * coefficients is the amplitude, phase and frequency for one term in
5244 * the model, and each array contains the number of terms called for by
5245 * the model.
5246 *
5247 * There are eighteen such arrays, named as follows:
5248 *<pre>
5249 * array model power of T component
5250 *
5251 * e0x Sun-to-Earth 0 x
5252 * e0y Sun-to-Earth 0 y
5253 * e0z Sun-to-Earth 0 z
5254 *
5255 * e1x Sun-to-Earth 1 x
5256 * e1y Sun-to-Earth 1 y
5257 * e1z Sun-to-Earth 1 z
5258 *
5259 * e2x Sun-to-Earth 2 x
5260 * e2y Sun-to-Earth 2 y
5261 * e2z Sun-to-Earth 2 z
5262 *
5263 * s0x SSB-to-Sun 0 x
5264 * s0y SSB-to-Sun 0 y
5265 * s0z SSB-to-Sun 0 z
5266 *
5267 * s1x SSB-to-Sun 1 x
5268 * s1y SSB-to-Sun 1 y
5269 * s1z SSB-to-Sun 1 z
5270 *
5271 * s2x SSB-to-Sun 2 x
5272 * s2y SSB-to-Sun 2 y
5273 * s2z SSB-to-Sun 2 z
5274 *<pre>
5275 */
5276
5277 /* Sun-to-Earth, T^0, X */
5278 static final double e0x[] = {
5279 0.9998292878132e+00, 0.1753485171504e+01, 0.6283075850446e+01,
5280 0.8352579567414e-02, 0.1710344404582e+01, 0.1256615170089e+02,
5281 0.5611445335148e-02, 0.0000000000000e+00, 0.0000000000000e+00,
5282 0.1046664295572e-03, 0.1667225416770e+01, 0.1884922755134e+02,
5283 0.3110842534677e-04, 0.6687513390251e+00, 0.8399684731857e+02,
5284 0.2552413503550e-04, 0.5830637358413e+00, 0.5296909721118e+00,
5285 0.2137207845781e-04, 0.1092330954011e+01, 0.1577343543434e+01,
5286 0.1680240182951e-04, 0.4955366134987e+00, 0.6279552690824e+01,
5287 0.1679012370795e-04, 0.6153014091901e+01, 0.6286599010068e+01,
5288 0.1445526946777e-04, 0.3472744100492e+01, 0.2352866153506e+01,
5289
5290 0.1091038246184e-04, 0.3689845786119e+01, 0.5223693906222e+01,
5291 0.9344399733932e-05, 0.6073934645672e+01, 0.1203646072878e+02,
5292 0.8993182910652e-05, 0.3175705249069e+01, 0.1021328554739e+02,
5293 0.5665546034116e-05, 0.2152484672246e+01, 0.1059381944224e+01,
5294 0.6844146703035e-05, 0.1306964099750e+01, 0.5753384878334e+01,
5295 0.7346610905565e-05, 0.4354980070466e+01, 0.3981490189893e+00,
5296 0.6815396474414e-05, 0.2218229211267e+01, 0.4705732307012e+01,
5297 0.6112787253053e-05, 0.5384788425458e+01, 0.6812766822558e+01,
5298 0.4518120711239e-05, 0.6087604012291e+01, 0.5884926831456e+01,
5299 0.4521963430706e-05, 0.1279424524906e+01, 0.6256777527156e+01,
5300
5301 0.4497426764085e-05, 0.5369129144266e+01, 0.6309374173736e+01,
5302 0.4062190566959e-05, 0.5436473303367e+00, 0.6681224869435e+01,
5303 0.5412193480192e-05, 0.7867838528395e+00, 0.7755226100720e+00,
5304 0.5469839049386e-05, 0.1461440311134e+01, 0.1414349524433e+02,
5305 0.5205264083477e-05, 0.4432944696116e+01, 0.7860419393880e+01,
5306 0.2149759935455e-05, 0.4502237496846e+01, 0.1150676975667e+02,
5307 0.2279109618501e-05, 0.1239441308815e+01, 0.7058598460518e+01,
5308 0.2259282939683e-05, 0.3272430985331e+01, 0.4694002934110e+01,
5309 0.2558950271319e-05, 0.2265471086404e+01, 0.1216800268190e+02,
5310 0.2561581447555e-05, 0.1454740653245e+01, 0.7099330490126e+00,
5311
5312 0.1781441115440e-05, 0.2962068630206e+01, 0.7962980379786e+00,
5313 0.1612005874644e-05, 0.1473255041006e+01, 0.5486777812467e+01,
5314 0.1818630667105e-05, 0.3743903293447e+00, 0.6283008715021e+01,
5315 0.1818601377529e-05, 0.6274174354554e+01, 0.6283142985870e+01,
5316 0.1554475925257e-05, 0.1624110906816e+01, 0.2513230340178e+02,
5317 0.2090948029241e-05, 0.5852052276256e+01, 0.1179062909082e+02,
5318 0.2000176345460e-05, 0.4072093298513e+01, 0.1778984560711e+02,
5319 0.1289535917759e-05, 0.5217019331069e+01, 0.7079373888424e+01,
5320 0.1281135307881e-05, 0.4802054538934e+01, 0.3738761453707e+01,
5321 0.1518229005692e-05, 0.8691914742502e+00, 0.2132990797783e+00,
5322
5323 0.9450128579027e-06, 0.4601859529950e+01, 0.1097707878456e+02,
5324 0.7781119494996e-06, 0.1844352816694e+01, 0.8827390247185e+01,
5325 0.7733407759912e-06, 0.3582790154750e+01, 0.5507553240374e+01,
5326 0.7350644318120e-06, 0.2695277788230e+01, 0.1589072916335e+01,
5327 0.6535928827023e-06, 0.3651327986142e+01, 0.1176985366291e+02,
5328 0.6324624183656e-06, 0.2241302375862e+01, 0.6262300422539e+01,
5329 0.6298565300557e-06, 0.4407122406081e+01, 0.6303851278352e+01,
5330 0.8587037089179e-06, 0.3024307223119e+01, 0.1672837615881e+03,
5331 0.8299954491035e-06, 0.6192539428237e+01, 0.3340612434717e+01,
5332 0.6311263503401e-06, 0.2014758795416e+01, 0.7113454667900e-02,
5333
5334 0.6005646745452e-06, 0.3399500503397e+01, 0.4136910472696e+01,
5335 0.7917715109929e-06, 0.2493386877837e+01, 0.6069776770667e+01,
5336 0.7556958099685e-06, 0.4159491740143e+01, 0.6496374930224e+01,
5337 0.6773228244949e-06, 0.4034162934230e+01, 0.9437762937313e+01,
5338 0.5370708577847e-06, 0.1562219163734e+01, 0.1194447056968e+01,
5339 0.5710804266203e-06, 0.2662730803386e+01, 0.6282095334605e+01,
5340 0.5709824583726e-06, 0.3985828430833e+01, 0.6284056366286e+01,
5341 0.5143950896447e-06, 0.1308144688689e+01, 0.6290189305114e+01,
5342 0.5088010604546e-06, 0.5352817214804e+01, 0.6275962395778e+01,
5343 0.4960369085172e-06, 0.2644267922349e+01, 0.6127655567643e+01,
5344
5345 0.4803137891183e-06, 0.4008844192080e+01, 0.6438496133249e+01,
5346 0.5731747768225e-06, 0.3794550174597e+01, 0.3154687086868e+01,
5347 0.4735947960579e-06, 0.6107118308982e+01, 0.3128388763578e+01,
5348 0.4808348796625e-06, 0.4771458618163e+01, 0.8018209333619e+00,
5349 0.4115073743137e-06, 0.3327111335159e+01, 0.8429241228195e+01,
5350 0.5230575889287e-06, 0.5305708551694e+01, 0.1336797263425e+02,
5351 0.5133977889215e-06, 0.5784230738814e+01, 0.1235285262111e+02,
5352 0.5065815825327e-06, 0.2052064793679e+01, 0.1185621865188e+02,
5353 0.4339831593868e-06, 0.3644994195830e+01, 0.1726015463500e+02,
5354 0.3952928638953e-06, 0.4930376436758e+01, 0.5481254917084e+01,
5355
5356 0.4898498111942e-06, 0.4542084219731e+00, 0.9225539266174e+01,
5357 0.4757490209328e-06, 0.3161126388878e+01, 0.5856477690889e+01,
5358 0.4727701669749e-06, 0.6214993845446e+00, 0.2544314396739e+01,
5359 0.3800966681863e-06, 0.3040132339297e+01, 0.4265981595566e+00,
5360 0.3257301077939e-06, 0.8064977360087e+00, 0.3930209696940e+01,
5361 0.3255810528674e-06, 0.1974147981034e+01, 0.2146165377750e+01,
5362 0.3252029748187e-06, 0.2845924913135e+01, 0.4164311961999e+01,
5363 0.3255505635308e-06, 0.3017900824120e+01, 0.5088628793478e+01,
5364 0.2801345211990e-06, 0.6109717793179e+01, 0.1256967486051e+02,
5365 0.3688987740970e-06, 0.2911550235289e+01, 0.1807370494127e+02,
5366
5367 0.2475153429458e-06, 0.2179146025856e+01, 0.2629832328990e-01,
5368 0.3033457749150e-06, 0.1994161050744e+01, 0.4535059491685e+01,
5369 0.2186743763110e-06, 0.5125687237936e+01, 0.1137170464392e+02,
5370 0.2764777032774e-06, 0.4822646860252e+00, 0.1256262854127e+02,
5371 0.2199028768592e-06, 0.4637633293831e+01, 0.1255903824622e+02,
5372 0.2046482824760e-06, 0.1467038733093e+01, 0.7084896783808e+01,
5373 0.2611209147507e-06, 0.3044718783485e+00, 0.7143069561767e+02,
5374 0.2286079656818e-06, 0.4764220356805e+01, 0.8031092209206e+01,
5375 0.1855071202587e-06, 0.3383637774428e+01, 0.1748016358760e+01,
5376 0.2324669506784e-06, 0.6189088449251e+01, 0.1831953657923e+02,
5377
5378 0.1709528015688e-06, 0.5874966729774e+00, 0.4933208510675e+01,
5379 0.2168156875828e-06, 0.4302994009132e+01, 0.1044738781244e+02,
5380 0.2106675556535e-06, 0.3800475419891e+01, 0.7477522907414e+01,
5381 0.1430213830465e-06, 0.1294660846502e+01, 0.2942463415728e+01,
5382 0.1388396901944e-06, 0.4594797202114e+01, 0.8635942003952e+01,
5383 0.1922258844190e-06, 0.4943044543591e+00, 0.1729818233119e+02,
5384 0.1888460058292e-06, 0.2426943912028e+01, 0.1561374759853e+03,
5385 0.1789449386107e-06, 0.1582973303499e+00, 0.1592596075957e+01,
5386 0.1360803685374e-06, 0.5197240440504e+01, 0.1309584267300e+02,
5387 0.1504038014709e-06, 0.3120360916217e+01, 0.1649636139783e+02,
5388
5389 0.1382769533389e-06, 0.6164702888205e+01, 0.7632943190217e+01,
5390 0.1438059769079e-06, 0.1437423770979e+01, 0.2042657109477e+02,
5391 0.1326303260037e-06, 0.3609688799679e+01, 0.1213955354133e+02,
5392 0.1159244950540e-06, 0.5463018167225e+01, 0.5331357529664e+01,
5393 0.1433118149136e-06, 0.6028909912097e+01, 0.7342457794669e+01,
5394 0.1234623148594e-06, 0.3109645574997e+01, 0.6279485555400e+01,
5395 0.1233949875344e-06, 0.3539359332866e+01, 0.6286666145492e+01,
5396 0.9927196061299e-07, 0.1259321569772e+01, 0.7234794171227e+01,
5397 0.1242302191316e-06, 0.1065949392609e+01, 0.1511046609763e+02,
5398 0.1098402195201e-06, 0.2192508743837e+01, 0.1098880815746e+02,
5399
5400 0.1158191395315e-06, 0.4054411278650e+01, 0.5729506548653e+01,
5401 0.9048475596241e-07, 0.5429764748518e+01, 0.9623688285163e+01,
5402 0.8889853269023e-07, 0.5046586206575e+01, 0.6148010737701e+01,
5403 0.1048694242164e-06, 0.2628858030806e+01, 0.6836645152238e+01,
5404 0.1112308378646e-06, 0.4177292719907e+01, 0.1572083878776e+02,
5405 0.8631729709901e-07, 0.1601345232557e+01, 0.6418140963190e+01,
5406 0.8527816951664e-07, 0.2463888997513e+01, 0.1471231707864e+02,
5407 0.7892139456991e-07, 0.3154022088718e+01, 0.2118763888447e+01,
5408 0.1051782905236e-06, 0.4795035816088e+01, 0.1349867339771e+01,
5409 0.1048219943164e-06, 0.2952983395230e+01, 0.5999216516294e+01,
5410
5411 0.7435760775143e-07, 0.5420547991464e+01, 0.6040347114260e+01,
5412 0.9869574106949e-07, 0.3695646753667e+01, 0.6566935184597e+01,
5413 0.9156886364226e-07, 0.3922675306609e+01, 0.5643178611111e+01,
5414 0.7006834356188e-07, 0.1233968624861e+01, 0.6525804586632e+01,
5415 0.9806170182601e-07, 0.1919542280684e+01, 0.2122839202813e+02,
5416 0.9052289673607e-07, 0.4615902724369e+01, 0.4690479774488e+01,
5417 0.7554200867893e-07, 0.1236863719072e+01, 0.1253985337760e+02,
5418 0.8215741286498e-07, 0.3286800101559e+00, 0.1097355562493e+02,
5419 0.7185178575397e-07, 0.5880942158367e+01, 0.6245048154254e+01,
5420 0.7130726476180e-07, 0.7674871987661e+00, 0.6321103546637e+01,
5421
5422 0.6650894461162e-07, 0.6987129150116e+00, 0.5327476111629e+01,
5423 0.7396888823688e-07, 0.3576824794443e+01, 0.5368044267797e+00,
5424 0.7420588884775e-07, 0.5033615245369e+01, 0.2354323048545e+02,
5425 0.6141181642908e-07, 0.9449927045673e+00, 0.1296430071988e+02,
5426 0.6373557924058e-07, 0.6206342280341e+01, 0.9517183207817e+00,
5427 0.6359474329261e-07, 0.5036079095757e+01, 0.1990745094947e+01,
5428 0.5740173582646e-07, 0.6105106371350e+01, 0.9555997388169e+00,
5429 0.7019864084602e-07, 0.7237747359018e+00, 0.5225775174439e+00,
5430 0.6398054487042e-07, 0.3976367969666e+01, 0.2407292145756e+02,
5431 0.7797092650498e-07, 0.4305423910623e+01, 0.2200391463820e+02,
5432
5433 0.6466760000900e-07, 0.3500136825200e+01, 0.5230807360890e+01,
5434 0.7529417043890e-07, 0.3514779246100e+01, 0.1842262939178e+02,
5435 0.6924571140892e-07, 0.2743457928679e+01, 0.1554202828031e+00,
5436 0.6220798650222e-07, 0.2242598118209e+01, 0.1845107853235e+02,
5437 0.5870209391853e-07, 0.2332832707527e+01, 0.6398972393349e+00,
5438 0.6263953473888e-07, 0.2191105358956e+01, 0.6277552955062e+01,
5439 0.6257781390012e-07, 0.4457559396698e+01, 0.6288598745829e+01,
5440 0.5697304945123e-07, 0.3499234761404e+01, 0.1551045220144e+01,
5441 0.6335438746791e-07, 0.6441691079251e+00, 0.5216580451554e+01,
5442 0.6377258441152e-07, 0.2252599151092e+01, 0.5650292065779e+01,
5443
5444 0.6484841818165e-07, 0.1992812417646e+01, 0.1030928125552e+00,
5445 0.4735551485250e-07, 0.3744672082942e+01, 0.1431416805965e+02,
5446 0.4628595996170e-07, 0.1334226211745e+01, 0.5535693017924e+00,
5447 0.6258152336933e-07, 0.4395836159154e+01, 0.2608790314060e+02,
5448 0.6196171366594e-07, 0.2587043007997e+01, 0.8467247584405e+02,
5449 0.6159556952126e-07, 0.4782499769128e+01, 0.2394243902548e+03,
5450 0.4987741172394e-07, 0.7312257619924e+00, 0.7771377146812e+02,
5451 0.5459280703142e-07, 0.3001376372532e+01, 0.6179983037890e+01,
5452 0.4863461189999e-07, 0.3767222128541e+01, 0.9027992316901e+02,
5453 0.5349912093158e-07, 0.3663594450273e+01, 0.6386168663001e+01,
5454
5455 0.5673725607806e-07, 0.4331187919049e+01, 0.6915859635113e+01,
5456 0.4745485060512e-07, 0.5816195745518e+01, 0.6282970628506e+01,
5457 0.4745379005326e-07, 0.8323672435672e+00, 0.6283181072386e+01,
5458 0.4049002796321e-07, 0.3785023976293e+01, 0.6254626709878e+01,
5459 0.4247084014515e-07, 0.2378220728783e+01, 0.7875671926403e+01,
5460 0.4026912363055e-07, 0.2864103423269e+01, 0.6311524991013e+01,
5461 0.4062935011774e-07, 0.2415408595975e+01, 0.3634620989887e+01,
5462 0.5347771048509e-07, 0.3343479309801e+01, 0.2515860172507e+02,
5463 0.4829494136505e-07, 0.2821742398262e+01, 0.5760498333002e+01,
5464 0.4342554404599e-07, 0.5624662458712e+01, 0.7238675589263e+01,
5465
5466 0.4021599184361e-07, 0.5557250275009e+00, 0.1101510648075e+02,
5467 0.4104900474558e-07, 0.3296691780005e+01, 0.6709674010002e+01,
5468 0.4376532905131e-07, 0.3814443999443e+01, 0.6805653367890e+01,
5469 0.3314590480650e-07, 0.3560229189250e+01, 0.1259245002418e+02,
5470 0.3232421839643e-07, 0.5185389180568e+01, 0.1066495398892e+01,
5471 0.3541176318876e-07, 0.3921381909679e+01, 0.9917696840332e+01,
5472 0.3689831242681e-07, 0.4190658955386e+01, 0.1192625446156e+02,
5473 0.3890605376774e-07, 0.5546023371097e+01, 0.7478166569050e-01,
5474 0.3038559339780e-07, 0.6231032794494e+01, 0.1256621883632e+02,
5475 0.3137083969782e-07, 0.6207063419190e+01, 0.4292330755499e+01,
5476
5477 0.4024004081854e-07, 0.1195257375713e+01, 0.1334167431096e+02,
5478 0.3300234879283e-07, 0.1804694240998e+01, 0.1057540660594e+02,
5479 0.3635399155575e-07, 0.5597811343500e+01, 0.6208294184755e+01,
5480 0.3032668691356e-07, 0.3191059366530e+01, 0.1805292951336e+02,
5481 0.2809652069058e-07, 0.4094348032570e+01, 0.3523159621801e-02,
5482 0.3696955383823e-07, 0.5219282738794e+01, 0.5966683958112e+01,
5483 0.3562894142503e-07, 0.1037247544554e+01, 0.6357857516136e+01,
5484 0.3510598524148e-07, 0.1430020816116e+01, 0.6599467742779e+01,
5485 0.3617736142953e-07, 0.3002911403677e+01, 0.6019991944201e+01,
5486 0.2624524910730e-07, 0.2437046757292e+01, 0.6702560555334e+01,
5487
5488 0.2535824204490e-07, 0.1581594689647e+01, 0.3141537925223e+02,
5489 0.3519787226257e-07, 0.5379863121521e+01, 0.2505706758577e+03,
5490 0.2578406709982e-07, 0.4904222639329e+01, 0.1673046366289e+02,
5491 0.3423887981473e-07, 0.3646448997315e+01, 0.6546159756691e+01,
5492 0.2776083886467e-07, 0.3307829300144e+01, 0.1272157198369e+02,
5493 0.3379592818379e-07, 0.1747541251125e+01, 0.1494531617769e+02,
5494 0.3050255426284e-07, 0.1784689432607e-01, 0.4732030630302e+01,
5495 0.2652378350236e-07, 0.4420055276260e+01, 0.5863591145557e+01,
5496 0.2374498173768e-07, 0.3629773929208e+01, 0.2388894113936e+01,
5497 0.2716451255140e-07, 0.3079623706780e+01, 0.1202934727411e+02,
5498
5499 0.3038583699229e-07, 0.3312487903507e+00, 0.1256608456547e+02,
5500 0.2220681228760e-07, 0.5265520401774e+01, 0.1336244973887e+02,
5501 0.3044156540912e-07, 0.4766664081250e+01, 0.2908881142201e+02,
5502 0.2731859923561e-07, 0.5069146530691e+01, 0.1391601904066e+02,
5503 0.2285603018171e-07, 0.5954935112271e+01, 0.6076890225335e+01,
5504 0.2025006454555e-07, 0.4061789589267e+01, 0.4701116388778e+01,
5505 0.2012597519804e-07, 0.2485047705241e+01, 0.6262720680387e+01,
5506 0.2003406962258e-07, 0.4163779209320e+01, 0.6303431020504e+01,
5507 0.2207863441371e-07, 0.6923839133828e+00, 0.6489261475556e+01,
5508 0.2481374305624e-07, 0.5944173595676e+01, 0.1204357418345e+02,
5509
5510 0.2130923288870e-07, 0.4641013671967e+01, 0.5746271423666e+01,
5511 0.2446370543391e-07, 0.6125796518757e+01, 0.1495633313810e+00,
5512 0.1932492759052e-07, 0.2234572324504e+00, 0.1352175143971e+02,
5513 0.2600122568049e-07, 0.4281012405440e+01, 0.4590910121555e+01,
5514 0.2431754047488e-07, 0.1429943874870e+00, 0.1162474756779e+01,
5515 0.1875902869209e-07, 0.9781803816948e+00, 0.6279194432410e+01,
5516 0.1874381139426e-07, 0.5670368130173e+01, 0.6286957268481e+01,
5517 0.2156696047173e-07, 0.2008985006833e+01, 0.1813929450232e+02,
5518 0.1965076182484e-07, 0.2566186202453e+00, 0.4686889479442e+01,
5519 0.2334816372359e-07, 0.4408121891493e+01, 0.1002183730415e+02,
5520
5521 0.1869937408802e-07, 0.5272745038656e+01, 0.2427287361862e+00,
5522 0.2436236460883e-07, 0.4407720479029e+01, 0.9514313292143e+02,
5523 0.1761365216611e-07, 0.1943892315074e+00, 0.1351787002167e+02,
5524 0.2156289480503e-07, 0.1418570924545e+01, 0.6037244212485e+01,
5525 0.2164748979255e-07, 0.4724603439430e+01, 0.2301353951334e+02,
5526 0.2222286670853e-07, 0.2400266874598e+01, 0.1266924451345e+02,
5527 0.2070901414929e-07, 0.5230348028732e+01, 0.6528907488406e+01,
5528 0.1792745177020e-07, 0.2099190328945e+01, 0.6819880277225e+01,
5529 0.1841802068445e-07, 0.3467527844848e+00, 0.6514761976723e+02,
5530 0.1578401631718e-07, 0.7098642356340e+00, 0.2077542790660e-01,
5531
5532 0.1561690152531e-07, 0.5943349620372e+01, 0.6272439236156e+01,
5533 0.1558591045463e-07, 0.7040653478980e+00, 0.6293712464735e+01,
5534 0.1737356469576e-07, 0.4487064760345e+01, 0.1765478049437e+02,
5535 0.1434755619991e-07, 0.2993391570995e+01, 0.1102062672231e+00,
5536 0.1482187806654e-07, 0.2278049198251e+01, 0.1052268489556e+01,
5537 0.1424812827089e-07, 0.1682114725827e+01, 0.1311972100268e+02,
5538 0.1380282448623e-07, 0.3262668602579e+01, 0.1017725758696e+02,
5539 0.1811481244566e-07, 0.3187771221777e+01, 0.1887552587463e+02,
5540 0.1504446185696e-07, 0.5650162308647e+01, 0.7626583626240e-01,
5541 0.1740776154137e-07, 0.5487068607507e+01, 0.1965104848470e+02,
5542
5543 0.1374339536251e-07, 0.5745688172201e+01, 0.6016468784579e+01,
5544 0.1761377477704e-07, 0.5748060203659e+01, 0.2593412433514e+02,
5545 0.1535138225795e-07, 0.6226848505790e+01, 0.9411464614024e+01,
5546 0.1788140543676e-07, 0.6189318878563e+01, 0.3301902111895e+02,
5547 0.1375002807996e-07, 0.5371812884394e+01, 0.6327837846670e+00,
5548 0.1242115758632e-07, 0.1471687569712e+01, 0.3894181736510e+01,
5549 0.1450977333938e-07, 0.4143836662127e+01, 0.1277945078067e+02,
5550 0.1297579575023e-07, 0.9003477661957e+00, 0.6549682916313e+01,
5551 0.1462667934821e-07, 0.5760505536428e+01, 0.1863592847156e+02,
5552 0.1381774374799e-07, 0.1085471729463e+01, 0.2379164476796e+01,
5553
5554 0.1682333169307e-07, 0.5409870870133e+01, 0.1620077269078e+02,
5555 0.1190812918837e-07, 0.1397205174601e+01, 0.1149965630200e+02,
5556 0.1221434762106e-07, 0.9001804809095e+00, 0.1257326515556e+02,
5557 0.1549934644860e-07, 0.4262528275544e+01, 0.1820933031200e+02,
5558 0.1252138953050e-07, 0.1411642012027e+01, 0.6993008899458e+01,
5559 0.1237078905387e-07, 0.2844472403615e+01, 0.2435678079171e+02,
5560 0.1446953389615e-07, 0.5295835522223e+01, 0.3813291813120e-01,
5561 0.1388446457170e-07, 0.4969428135497e+01, 0.2458316379602e+00,
5562 0.1019339179228e-07, 0.2491369561806e+01, 0.6112403035119e+01,
5563 0.1258880815343e-07, 0.4679426248976e+01, 0.5429879531333e+01,
5564
5565 0.1297768238261e-07, 0.1074509953328e+01, 0.1249137003520e+02,
5566 0.9913505718094e-08, 0.4735097918224e+01, 0.6247047890016e+01,
5567 0.9830453155969e-08, 0.4158649187338e+01, 0.6453748665772e+01,
5568 0.1192615865309e-07, 0.3438208613699e+01, 0.6290122169689e+01,
5569 0.9835874798277e-08, 0.1913300781229e+01, 0.6319103810876e+01,
5570 0.9639087569277e-08, 0.9487683644125e+00, 0.8273820945392e+01,
5571 0.1175716107001e-07, 0.3228141664287e+01, 0.6276029531202e+01,
5572 0.1018926508678e-07, 0.2216607854300e+01, 0.1254537627298e+02,
5573 0.9500087869225e-08, 0.2625116459733e+01, 0.1256517118505e+02,
5574 0.9664192916575e-08, 0.5860562449214e+01, 0.6259197520765e+01,
5575
5576 0.9612858712203e-08, 0.7885682917381e+00, 0.6306954180126e+01,
5577 0.1117645675413e-07, 0.3932148831189e+01, 0.1779695906178e+02,
5578 0.1158864052160e-07, 0.9995605521691e+00, 0.1778273215245e+02,
5579 0.9021043467028e-08, 0.5263769742673e+01, 0.6172869583223e+01,
5580 0.8836134773563e-08, 0.1496843220365e+01, 0.1692165728891e+01,
5581 0.1045872200691e-07, 0.7009039517214e+00, 0.2204125344462e+00,
5582 0.1211463487798e-07, 0.4041544938511e+01, 0.8257698122054e+02,
5583 0.8541990804094e-08, 0.1447586692316e+01, 0.6393282117669e+01,
5584 0.1038720703636e-07, 0.4594249718112e+00, 0.1550861511662e+02,
5585 0.1126722351445e-07, 0.3925550579036e+01, 0.2061856251104e+00,
5586
5587 0.8697373859631e-08, 0.4411341856037e+01, 0.9491756770005e+00,
5588 0.8869380028441e-08, 0.2402659724813e+01, 0.3903911373650e+01,
5589 0.9247014693258e-08, 0.1401579743423e+01, 0.6267823317922e+01,
5590 0.9205062930950e-08, 0.5245978000814e+01, 0.6298328382969e+01,
5591 0.8000745038049e-08, 0.3590803356945e+01, 0.2648454860559e+01,
5592 0.9168973650819e-08, 0.2470150501679e+01, 0.1498544001348e+03,
5593 0.1075444949238e-07, 0.1328606161230e+01, 0.3694923081589e+02,
5594 0.7817298525817e-08, 0.6162256225998e+01, 0.4804209201333e+01,
5595 0.9541469226356e-08, 0.3942568967039e+01, 0.1256713221673e+02,
5596 0.9821910122027e-08, 0.2360246287233e+00, 0.1140367694411e+02,
5597
5598 0.9897822023777e-08, 0.4619805634280e+01, 0.2280573557157e+02,
5599 0.7737289283765e-08, 0.3784727847451e+01, 0.7834121070590e+01,
5600 0.9260204034710e-08, 0.2223352487601e+01, 0.2787043132925e+01,
5601 0.7320252888486e-08, 0.1288694636874e+01, 0.6282655592598e+01,
5602 0.7319785780946e-08, 0.5359869567774e+01, 0.6283496108294e+01,
5603 0.7147219933778e-08, 0.5516616675856e+01, 0.1725663147538e+02,
5604 0.7946502829878e-08, 0.2630459984567e+01, 0.1241073141809e+02,
5605 0.9001711808932e-08, 0.2849815827227e+01, 0.6281591679874e+01,
5606 0.8994041507257e-08, 0.3795244450750e+01, 0.6284560021018e+01,
5607 0.8298582787358e-08, 0.5236413127363e+00, 0.1241658836951e+02,
5608
5609 0.8526596520710e-08, 0.4794605424426e+01, 0.1098419223922e+02,
5610 0.8209822103197e-08, 0.1578752370328e+01, 0.1096996532989e+02,
5611 0.6357049861094e-08, 0.5708926113761e+01, 0.1596186371003e+01,
5612 0.7370473179049e-08, 0.3842402530241e+01, 0.4061219149443e+01,
5613 0.7232154664726e-08, 0.3067548981535e+01, 0.1610006857377e+03,
5614 0.6328765494903e-08, 0.1313930030069e+01, 0.1193336791622e+02,
5615 0.8030064908595e-08, 0.3488500408886e+01, 0.8460828644453e+00,
5616 0.6275464259232e-08, 0.1532061626198e+01, 0.8531963191132e+00,
5617 0.7051897446325e-08, 0.3285859929993e+01, 0.5849364236221e+01,
5618 0.6161593705428e-08, 0.1477341999464e+01, 0.5573142801433e+01,
5619
5620 0.7754683957278e-08, 0.1586118663096e+01, 0.8662240327241e+01,
5621 0.5889928990701e-08, 0.1304887868803e+01, 0.1232342296471e+02,
5622 0.5705756047075e-08, 0.4555333589350e+01, 0.1258692712880e+02,
5623 0.5964178808332e-08, 0.3001762842062e+01, 0.5333900173445e+01,
5624 0.6712446027467e-08, 0.4886780007595e+01, 0.1171295538178e+02,
5625 0.5941809275464e-08, 0.4701509603824e+01, 0.9779108567966e+01,
5626 0.5466993627395e-08, 0.4588357817278e+01, 0.1884211409667e+02,
5627 0.6340512090980e-08, 0.1164543038893e+01, 0.5217580628120e+02,
5628 0.6325505710045e-08, 0.3919171259645e+01, 0.1041998632314e+02,
5629 0.6164789509685e-08, 0.2143828253542e+01, 0.6151533897323e+01,
5630
5631 0.5263330812430e-08, 0.6066564434241e+01, 0.1885275071096e+02,
5632 0.5597087780221e-08, 0.2926316429472e+01, 0.4337116142245e+00,
5633 0.5396556236817e-08, 0.3244303591505e+01, 0.6286362197481e+01,
5634 0.5396615148223e-08, 0.3404304703662e+01, 0.6279789503410e+01,
5635 0.7091832443341e-08, 0.8532377803192e+00, 0.4907302013889e+01,
5636 0.6572352589782e-08, 0.4901966774419e+01, 0.1176433076753e+02,
5637 0.5960236060795e-08, 0.1874672315797e+01, 0.1422690933580e-01,
5638 0.5125480043511e-08, 0.3735726064334e+01, 0.1245594543367e+02,
5639 0.5928241866410e-08, 0.4502033899935e+01, 0.6414617803568e+01,
5640 0.5249600357424e-08, 0.4372334799878e+01, 0.1151388321134e+02,
5641
5642 0.6059171276087e-08, 0.2581617302908e+01, 0.6062663316000e+01,
5643 0.5295235081662e-08, 0.2974811513158e+01, 0.3496032717521e+01,
5644 0.5820561875933e-08, 0.1796073748244e+00, 0.2838593341516e+00,
5645 0.4754696606440e-08, 0.1981998136973e+01, 0.3104930017775e+01,
5646 0.6385053548955e-08, 0.2559174171605e+00, 0.6133512519065e+01,
5647 0.6589828273941e-08, 0.2750967106776e+01, 0.4087944051283e+02,
5648 0.5383376567189e-08, 0.6325947523578e+00, 0.2248384854122e+02,
5649 0.5928941683538e-08, 0.1672304519067e+01, 0.1581959461667e+01,
5650 0.4816060709794e-08, 0.3512566172575e+01, 0.9388005868221e+01,
5651 0.6003381586512e-08, 0.5610932219189e+01, 0.5326786718777e+01,
5652
5653 0.5504225393105e-08, 0.4037501131256e+01, 0.6503488384892e+01,
5654 0.5353772620129e-08, 0.6122774968240e+01, 0.1735668374386e+03,
5655 0.5786253768544e-08, 0.5527984999515e+01, 0.1350651127443e+00,
5656 0.5065706702002e-08, 0.9980765573624e+00, 0.1248988586463e+02,
5657 0.5972838885276e-08, 0.6044489493203e+01, 0.2673594526851e+02,
5658 0.5323585877961e-08, 0.3924265998147e+01, 0.4171425416666e+01,
5659 0.5210772682858e-08, 0.6220111376901e+01, 0.2460261242967e+02,
5660 0.4726549040535e-08, 0.3716043206862e+01, 0.7232251527446e+01,
5661 0.6029425105059e-08, 0.8548704071116e+00, 0.3227113045244e+03,
5662 0.4481542826513e-08, 0.1426925072829e+01, 0.5547199253223e+01,
5663
5664 0.5836024505068e-08, 0.7135651752625e-01, 0.7285056171570e+02,
5665 0.4137046613272e-08, 0.5330767643283e+01, 0.1087398597200e+02,
5666 0.5171977473924e-08, 0.4494262335353e+00, 0.1884570439172e+02,
5667 0.5694429833732e-08, 0.2952369582215e+01, 0.9723862754494e+02,
5668 0.4009158925298e-08, 0.3500003416535e+01, 0.6244942932314e+01,
5669 0.4784939596873e-08, 0.6196709413181e+01, 0.2929661536378e+02,
5670 0.3983725022610e-08, 0.5103690031897e+01, 0.4274518229222e+01,
5671 0.3870535232462e-08, 0.3187569587401e+01, 0.6321208768577e+01,
5672 0.5140501213951e-08, 0.1668924357457e+01, 0.1232032006293e+02,
5673 0.3849034819355e-08, 0.4445722510309e+01, 0.1726726808967e+02,
5674
5675 0.4002383075060e-08, 0.5226224152423e+01, 0.7018952447668e+01,
5676 0.3890719543549e-08, 0.4371166550274e+01, 0.1491901785440e+02,
5677 0.4887084607881e-08, 0.5973556689693e+01, 0.1478866649112e+01,
5678 0.3739939287592e-08, 0.2089084714600e+01, 0.6922973089781e+01,
5679 0.5031925918209e-08, 0.4658371936827e+01, 0.1715706182245e+02,
5680 0.4387748764954e-08, 0.4825580552819e+01, 0.2331413144044e+03,
5681 0.4147398098865e-08, 0.3739003524998e+01, 0.1376059875786e+02,
5682 0.3719089993586e-08, 0.1148941386536e+01, 0.6297302759782e+01,
5683 0.3934238461056e-08, 0.1559893008343e+01, 0.7872148766781e+01,
5684 0.3672471375622e-08, 0.5516145383612e+01, 0.6268848941110e+01,
5685
5686 0.3768911277583e-08, 0.6116053700563e+01, 0.4157198507331e+01,
5687 0.4033388417295e-08, 0.5076821746017e+01, 0.1567108171867e+02,
5688 0.3764194617832e-08, 0.8164676232075e+00, 0.3185192151914e+01,
5689 0.4840628226284e-08, 0.1360479453671e+01, 0.1252801878276e+02,
5690 0.4949443923785e-08, 0.2725622229926e+01, 0.1617106187867e+03,
5691 0.4117393089971e-08, 0.6054459628492e+00, 0.5642198095270e+01,
5692 0.3925754020428e-08, 0.8570462135210e+00, 0.2139354194808e+02,
5693 0.3630551757923e-08, 0.3552067338279e+01, 0.6294805223347e+01,
5694 0.3627274802357e-08, 0.3096565085313e+01, 0.6271346477544e+01,
5695 0.3806143885093e-08, 0.6367751709777e+00, 0.1725304118033e+02,
5696
5697 0.4433254641565e-08, 0.4848461503937e+01, 0.7445550607224e+01,
5698 0.3712319846576e-08, 0.1331950643655e+01, 0.4194847048887e+00,
5699 0.3849847534783e-08, 0.4958368297746e+00, 0.9562891316684e+00,
5700 0.3483955430165e-08, 0.2237215515707e+01, 0.1161697602389e+02,
5701 0.3961912730982e-08, 0.3332402188575e+01, 0.2277943724828e+02,
5702 0.3419978244481e-08, 0.5785600576016e+01, 0.1362553364512e+02,
5703 0.3329417758177e-08, 0.9812676559709e-01, 0.1685848245639e+02,
5704 0.4207206893193e-08, 0.9494780468236e+00, 0.2986433403208e+02,
5705 0.3268548976410e-08, 0.1739332095686e+00, 0.5749861718712e+01,
5706 0.3321880082685e-08, 0.1423354800666e+01, 0.6279143387820e+01,
5707
5708 0.4503173010852e-08, 0.2314972675293e+00, 0.1385561574497e+01,
5709 0.4316599090954e-08, 0.1012646782616e+00, 0.4176041334900e+01,
5710 0.3283493323850e-08, 0.5233306881265e+01, 0.6287008313071e+01,
5711 0.3164033542343e-08, 0.4005597257511e+01, 0.2099539292909e+02,
5712 0.4159720956725e-08, 0.5365676242020e+01, 0.5905702259363e+01,
5713 0.3565176892217e-08, 0.4284440620612e+01, 0.3932462625300e-02,
5714 0.3514440950221e-08, 0.4270562636575e+01, 0.7335344340001e+01,
5715 0.3540596871909e-08, 0.5953553201060e+01, 0.1234573916645e+02,
5716 0.2960769905118e-08, 0.1115180417718e+01, 0.2670964694522e+02,
5717 0.2962213739684e-08, 0.3863811918186e+01, 0.6408777551755e+00,
5718
5719 0.3883556700251e-08, 0.1268617928302e+01, 0.6660449441528e+01,
5720 0.2919225516346e-08, 0.4908605223265e+01, 0.1375773836557e+01,
5721 0.3115158863370e-08, 0.3744519976885e+01, 0.3802769619140e-01,
5722 0.4099438144212e-08, 0.4173244670532e+01, 0.4480965020977e+02,
5723 0.2899531858964e-08, 0.5910601428850e+01, 0.2059724391010e+02,
5724 0.3289733429855e-08, 0.2488050078239e+01, 0.1081813534213e+02,
5725 0.3933075612875e-08, 0.1122363652883e+01, 0.3773735910827e+00,
5726 0.3021403764467e-08, 0.4951973724904e+01, 0.2982630633589e+02,
5727 0.2798598949757e-08, 0.5117057845513e+01, 0.1937891852345e+02,
5728 0.3397421302707e-08, 0.6104159180476e+01, 0.6923953605621e+01,
5729
5730 0.3720398002179e-08, 0.1184933429829e+01, 0.3066615496545e+02,
5731 0.3598484186267e-08, 0.3505282086105e+01, 0.6147450479709e+01,
5732 0.3694594027310e-08, 0.2286651088141e+01, 0.2636725487657e+01,
5733 0.2680444152969e-08, 0.1871816775482e+00, 0.6816289982179e+01,
5734 0.3497574865641e-08, 0.3143251755431e+01, 0.6418701221183e+01,
5735 0.3130274129494e-08, 0.2462167316018e+01, 0.1235996607578e+02,
5736 0.3241119069551e-08, 0.4256374004686e+01, 0.1652265972112e+02,
5737 0.2601960842061e-08, 0.4970362941425e+01, 0.1045450126711e+02,
5738 0.2690601527504e-08, 0.2372657824898e+01, 0.3163918923335e+00,
5739 0.2908688152664e-08, 0.4232652627721e+01, 0.2828699048865e+02,
5740
5741 0.3120456131875e-08, 0.3925747001137e+00, 0.2195415756911e+02,
5742 0.3148855423384e-08, 0.3093478330445e+01, 0.1172006883645e+02,
5743 0.3051044261017e-08, 0.5560948248212e+01, 0.6055599646783e+01,
5744 0.2826006876660e-08, 0.5072790310072e+01, 0.5120601093667e+01,
5745 0.3100034191711e-08, 0.4998530231096e+01, 0.1799603123222e+02,
5746 0.2398771640101e-08, 0.2561739802176e+01, 0.6255674361143e+01,
5747 0.2384002842728e-08, 0.4087420284111e+01, 0.6310477339748e+01,
5748 0.2842146517568e-08, 0.2515048217955e+01, 0.5469525544182e+01,
5749 0.2847674371340e-08, 0.5235326497443e+01, 0.1034429499989e+02,
5750 0.2903722140764e-08, 0.1088200795797e+01, 0.6510552054109e+01,
5751
5752 0.3187610710605e-08, 0.4710624424816e+01, 0.1693792562116e+03,
5753 0.3048869992813e-08, 0.2857975896445e+00, 0.8390110365991e+01,
5754 0.2860216950984e-08, 0.2241619020815e+01, 0.2243449970715e+00,
5755 0.2701117683113e-08, 0.6651573305272e-01, 0.6129297044991e+01,
5756 0.2509891590152e-08, 0.1285135324585e+01, 0.1044027435778e+02,
5757 0.2623200252223e-08, 0.2981229834530e+00, 0.6436854655901e+01,
5758 0.2622541669202e-08, 0.6122470726189e+01, 0.9380959548977e+01,
5759 0.2818435667099e-08, 0.4251087148947e+01, 0.5934151399930e+01,
5760 0.2365196797465e-08, 0.3465070460790e+01, 0.2470570524223e+02,
5761 0.2358704646143e-08, 0.5791603815350e+01, 0.8671969964381e+01,
5762
5763 0.2388299481390e-08, 0.4142483772941e+01, 0.7096626156709e+01,
5764 0.1996041217224e-08, 0.2101901889496e+01, 0.1727188400790e+02,
5765 0.2687593060336e-08, 0.1526689456959e+01, 0.7075506709219e+02,
5766 0.2618913670810e-08, 0.2397684236095e+01, 0.6632000300961e+01,
5767 0.2571523050364e-08, 0.5751929456787e+00, 0.6206810014183e+01,
5768 0.2582135006946e-08, 0.5595464352926e+01, 0.4873985990671e+02,
5769 0.2372530190361e-08, 0.5092689490655e+01, 0.1590676413561e+02,
5770 0.2357178484712e-08, 0.4444363527851e+01, 0.3097883698531e+01,
5771 0.2451590394723e-08, 0.3108251687661e+01, 0.6612329252343e+00,
5772 0.2370045949608e-08, 0.2608133861079e+01, 0.3459636466239e+02,
5773
5774 0.2268997267358e-08, 0.3639717753384e+01, 0.2844914056730e-01,
5775 0.1731432137906e-08, 0.1741898445707e+00, 0.2019909489111e+02,
5776 0.1629869741622e-08, 0.3902225646724e+01, 0.3035599730800e+02,
5777 0.2206215801974e-08, 0.4971131250731e+01, 0.6281667977667e+01,
5778 0.2205469554680e-08, 0.1677462357110e+01, 0.6284483723224e+01,
5779 0.2148792362509e-08, 0.4236259604006e+01, 0.1980482729015e+02,
5780 0.1873733657847e-08, 0.5926814998687e+01, 0.2876692439167e+02,
5781 0.2026573758959e-08, 0.4349643351962e+01, 0.2449240616245e+02,
5782 0.1807770325110e-08, 0.5700940482701e+01, 0.2045286941806e+02,
5783 0.1881174408581e-08, 0.6601286363430e+00, 0.2358125818164e+02,
5784
5785 0.1368023671690e-08, 0.2211098592752e+01, 0.2473415438279e+02,
5786 0.1720017916280e-08, 0.4942488551129e+01, 0.1679593901136e+03,
5787 0.1702427665131e-08, 0.1452233856386e+01, 0.3338575901272e+03,
5788 0.1414032510054e-08, 0.5525357721439e+01, 0.1624205518357e+03,
5789 0.1652626045364e-08, 0.4108794283624e+01, 0.8956999012000e+02,
5790 0.1642957769686e-08, 0.7344335209984e+00, 0.5267006960365e+02,
5791 0.1614952403624e-08, 0.3541213951363e+01, 0.3332657872986e+02,
5792 0.1535988291188e-08, 0.4031094072151e+01, 0.3852657435933e+02,
5793 0.1593193738177e-08, 0.4185136203609e+01, 0.2282781046519e+03,
5794 0.1074569126382e-08, 0.1720485636868e+01, 0.8397383534231e+02,
5795
5796 0.1074408214509e-08, 0.2758613420318e+01, 0.8401985929482e+02,
5797 0.9700199670465e-09, 0.4216686842097e+01, 0.7826370942180e+02,
5798 0.1258433517061e-08, 0.2575068876639e+00, 0.3115650189215e+03,
5799 0.1240303229539e-08, 0.4800844956756e+00, 0.1784300471910e+03,
5800 0.9018345948127e-09, 0.3896756361552e+00, 0.5886454391678e+02,
5801 0.1135301432805e-08, 0.3700805023550e+00, 0.7842370451713e+02,
5802 0.9215887951370e-09, 0.4364579276638e+01, 0.1014262087719e+03,
5803 0.1055401054147e-08, 0.2156564222111e+01, 0.5660027930059e+02,
5804 0.1008725979831e-08, 0.5454015785234e+01, 0.4245678405627e+02,
5805 0.7217398104321e-09, 0.1597772562175e+01, 0.2457074661053e+03,
5806
5807 0.6912033134447e-09, 0.5824090621461e+01, 0.1679936946371e+03,
5808 0.6833881523549e-09, 0.3578778482835e+01, 0.6053048899753e+02,
5809 0.4887304205142e-09, 0.3724362812423e+01, 0.9656299901946e+02,
5810 0.5173709754788e-09, 0.5422427507933e+01, 0.2442876000072e+03,
5811 0.4671353097145e-09, 0.2396106924439e+01, 0.1435713242844e+03,
5812 0.5652608439480e-09, 0.2804028838685e+01, 0.8365903305582e+02,
5813 0.5604061331253e-09, 0.1638816006247e+01, 0.8433466158131e+02,
5814 0.4712723365400e-09, 0.8979003224474e+00, 0.3164282286739e+03,
5815 0.4909967465112e-09, 0.3210426725516e+01, 0.4059982187939e+03,
5816 0.4771358267658e-09, 0.5308027211629e+01, 0.1805255418145e+03,
5817
5818 0.3943451445989e-09, 0.2195145341074e+01, 0.2568537517081e+03,
5819 0.3952109120244e-09, 0.5081189491586e+01, 0.2449975330562e+03,
5820 0.3788134594789e-09, 0.4345171264441e+01, 0.1568131045107e+03,
5821 0.3738330190479e-09, 0.2613062847997e+01, 0.3948519331910e+03,
5822 0.3099866678136e-09, 0.2846760817689e+01, 0.1547176098872e+03,
5823 0.2002962716768e-09, 0.4921360989412e+01, 0.2268582385539e+03,
5824 0.2198291338754e-09, 0.1130360117454e+00, 0.1658638954901e+03,
5825 0.1491958330784e-09, 0.4228195232278e+01, 0.2219950288015e+03,
5826 0.1475384076173e-09, 0.3005721811604e+00, 0.3052819430710e+03,
5827 0.1661626624624e-09, 0.7830125621203e+00, 0.2526661704812e+03,
5828
5829 0.9015823460025e-10, 0.3807792942715e+01, 0.4171445043968e+03 };
5830
5831 /* Sun-to-Earth, T^0, Y */
5832 static final double e0y[] = {
5833 0.9998921098898e+00, 0.1826583913846e+00, 0.6283075850446e+01,
5834 -0.2442700893735e-01, 0.0000000000000e+00, 0.0000000000000e+00,
5835 0.8352929742915e-02, 0.1395277998680e+00, 0.1256615170089e+02,
5836 0.1046697300177e-03, 0.9641423109763e-01, 0.1884922755134e+02,
5837 0.3110841876663e-04, 0.5381140401712e+01, 0.8399684731857e+02,
5838 0.2570269094593e-04, 0.5301016407128e+01, 0.5296909721118e+00,
5839 0.2147389623610e-04, 0.2662510869850e+01, 0.1577343543434e+01,
5840 0.1680344384050e-04, 0.5207904119704e+01, 0.6279552690824e+01,
5841 0.1679117312193e-04, 0.4582187486968e+01, 0.6286599010068e+01,
5842 0.1440512068440e-04, 0.1900688517726e+01, 0.2352866153506e+01,
5843
5844 0.1135139664999e-04, 0.5273108538556e+01, 0.5223693906222e+01,
5845 0.9345482571018e-05, 0.4503047687738e+01, 0.1203646072878e+02,
5846 0.9007418719568e-05, 0.1605621059637e+01, 0.1021328554739e+02,
5847 0.5671536712314e-05, 0.5812849070861e+00, 0.1059381944224e+01,
5848 0.7451401861666e-05, 0.2807346794836e+01, 0.3981490189893e+00,
5849 0.6393470057114e-05, 0.6029224133855e+01, 0.5753384878334e+01,
5850 0.6814275881697e-05, 0.6472990145974e+00, 0.4705732307012e+01,
5851 0.6113705628887e-05, 0.3813843419700e+01, 0.6812766822558e+01,
5852 0.4503851367273e-05, 0.4527804370996e+01, 0.5884926831456e+01,
5853 0.4522249141926e-05, 0.5991783029224e+01, 0.6256777527156e+01,
5854
5855 0.4501794307018e-05, 0.3798703844397e+01, 0.6309374173736e+01,
5856 0.5514927480180e-05, 0.3961257833388e+01, 0.5507553240374e+01,
5857 0.4062862799995e-05, 0.5256247296369e+01, 0.6681224869435e+01,
5858 0.5414900429712e-05, 0.5499032014097e+01, 0.7755226100720e+00,
5859 0.5463153987424e-05, 0.6173092454097e+01, 0.1414349524433e+02,
5860 0.5071611859329e-05, 0.2870244247651e+01, 0.7860419393880e+01,
5861 0.2195112094455e-05, 0.2952338617201e+01, 0.1150676975667e+02,
5862 0.2279139233919e-05, 0.5951775132933e+01, 0.7058598460518e+01,
5863 0.2278386100876e-05, 0.4845456398785e+01, 0.4694002934110e+01,
5864 0.2559088003308e-05, 0.6945321117311e+00, 0.1216800268190e+02,
5865
5866 0.2561079286856e-05, 0.6167224608301e+01, 0.7099330490126e+00,
5867 0.1792755796387e-05, 0.1400122509632e+01, 0.7962980379786e+00,
5868 0.1818715656502e-05, 0.4703347611830e+01, 0.6283142985870e+01,
5869 0.1818744924791e-05, 0.5086748900237e+01, 0.6283008715021e+01,
5870 0.1554518791390e-05, 0.5331008042713e-01, 0.2513230340178e+02,
5871 0.2063265737239e-05, 0.4283680484178e+01, 0.1179062909082e+02,
5872 0.1497613520041e-05, 0.6074207826073e+01, 0.5486777812467e+01,
5873 0.2000617940427e-05, 0.2501426281450e+01, 0.1778984560711e+02,
5874 0.1289731195580e-05, 0.3646340599536e+01, 0.7079373888424e+01,
5875 0.1282657998934e-05, 0.3232864804902e+01, 0.3738761453707e+01,
5876
5877 0.1528915968658e-05, 0.5581433416669e+01, 0.2132990797783e+00,
5878 0.1187304098432e-05, 0.5453576453694e+01, 0.9437762937313e+01,
5879 0.7842782928118e-06, 0.2823953922273e+00, 0.8827390247185e+01,
5880 0.7352892280868e-06, 0.1124369580175e+01, 0.1589072916335e+01,
5881 0.6570189360797e-06, 0.2089154042840e+01, 0.1176985366291e+02,
5882 0.6324967590410e-06, 0.6704855581230e+00, 0.6262300422539e+01,
5883 0.6298289872283e-06, 0.2836414855840e+01, 0.6303851278352e+01,
5884 0.6476686465855e-06, 0.4852433866467e+00, 0.7113454667900e-02,
5885 0.8587034651234e-06, 0.1453511005668e+01, 0.1672837615881e+03,
5886 0.8068948788113e-06, 0.9224087798609e+00, 0.6069776770667e+01,
5887
5888 0.8353786011661e-06, 0.4631707184895e+01, 0.3340612434717e+01,
5889 0.6009324532132e-06, 0.1829498827726e+01, 0.4136910472696e+01,
5890 0.7558158559566e-06, 0.2588596800317e+01, 0.6496374930224e+01,
5891 0.5809279504503e-06, 0.5516818853476e+00, 0.1097707878456e+02,
5892 0.5374131950254e-06, 0.6275674734960e+01, 0.1194447056968e+01,
5893 0.5711160507326e-06, 0.1091905956872e+01, 0.6282095334605e+01,
5894 0.5710183170746e-06, 0.2415001635090e+01, 0.6284056366286e+01,
5895 0.5144373590610e-06, 0.6020336443438e+01, 0.6290189305114e+01,
5896 0.5103108927267e-06, 0.3775634564605e+01, 0.6275962395778e+01,
5897 0.4960654697891e-06, 0.1073450946756e+01, 0.6127655567643e+01,
5898
5899 0.4786385689280e-06, 0.2431178012310e+01, 0.6438496133249e+01,
5900 0.6109911263665e-06, 0.5343356157914e+01, 0.3154687086868e+01,
5901 0.4839898944024e-06, 0.5830833594047e-01, 0.8018209333619e+00,
5902 0.4734822623919e-06, 0.4536080134821e+01, 0.3128388763578e+01,
5903 0.4834741473290e-06, 0.2585090489754e+00, 0.7084896783808e+01,
5904 0.5134858581156e-06, 0.4213317172603e+01, 0.1235285262111e+02,
5905 0.5064004264978e-06, 0.4814418806478e+00, 0.1185621865188e+02,
5906 0.3753476772761e-06, 0.1599953399788e+01, 0.8429241228195e+01,
5907 0.4935264014283e-06, 0.2157417556873e+01, 0.2544314396739e+01,
5908 0.3950929600897e-06, 0.3359394184254e+01, 0.5481254917084e+01,
5909
5910 0.4895849789777e-06, 0.5165704376558e+01, 0.9225539266174e+01,
5911 0.4215241688886e-06, 0.2065368800993e+01, 0.1726015463500e+02,
5912 0.3796773731132e-06, 0.1468606346612e+01, 0.4265981595566e+00,
5913 0.3114178142515e-06, 0.3615638079474e+01, 0.2146165377750e+01,
5914 0.3260664220838e-06, 0.4417134922435e+01, 0.4164311961999e+01,
5915 0.3976996123008e-06, 0.4700866883004e+01, 0.5856477690889e+01,
5916 0.2801459672924e-06, 0.4538902060922e+01, 0.1256967486051e+02,
5917 0.3638931868861e-06, 0.1334197991475e+01, 0.1807370494127e+02,
5918 0.2487013269476e-06, 0.3749275558275e+01, 0.2629832328990e-01,
5919 0.3034165481994e-06, 0.4236622030873e+00, 0.4535059491685e+01,
5920
5921 0.2676278825586e-06, 0.5970848007811e+01, 0.3930209696940e+01,
5922 0.2764903818918e-06, 0.5194636754501e+01, 0.1256262854127e+02,
5923 0.2485149930507e-06, 0.1002434207846e+01, 0.5088628793478e+01,
5924 0.2199305540941e-06, 0.3066773098403e+01, 0.1255903824622e+02,
5925 0.2571106500435e-06, 0.7588312459063e+00, 0.1336797263425e+02,
5926 0.2049751817158e-06, 0.3444977434856e+01, 0.1137170464392e+02,
5927 0.2599707296297e-06, 0.1873128542205e+01, 0.7143069561767e+02,
5928 0.1785018072217e-06, 0.5015891306615e+01, 0.1748016358760e+01,
5929 0.2324833891115e-06, 0.4618271239730e+01, 0.1831953657923e+02,
5930 0.1709711119545e-06, 0.5300003455669e+01, 0.4933208510675e+01,
5931
5932 0.2107159351716e-06, 0.2229819815115e+01, 0.7477522907414e+01,
5933 0.1750333080295e-06, 0.6161485880008e+01, 0.1044738781244e+02,
5934 0.2000598210339e-06, 0.2967357299999e+01, 0.8031092209206e+01,
5935 0.1380920248681e-06, 0.3027007923917e+01, 0.8635942003952e+01,
5936 0.1412460470299e-06, 0.6037597163798e+01, 0.2942463415728e+01,
5937 0.1888459803001e-06, 0.8561476243374e+00, 0.1561374759853e+03,
5938 0.1788370542585e-06, 0.4869736290209e+01, 0.1592596075957e+01,
5939 0.1360893296167e-06, 0.3626411886436e+01, 0.1309584267300e+02,
5940 0.1506846530160e-06, 0.1550975377427e+01, 0.1649636139783e+02,
5941 0.1800913376176e-06, 0.2075826033190e+01, 0.1729818233119e+02,
5942
5943 0.1436261390649e-06, 0.6148876420255e+01, 0.2042657109477e+02,
5944 0.1220227114151e-06, 0.4382583879906e+01, 0.7632943190217e+01,
5945 0.1337883603592e-06, 0.2036644327361e+01, 0.1213955354133e+02,
5946 0.1159326650738e-06, 0.3892276994687e+01, 0.5331357529664e+01,
5947 0.1352853128569e-06, 0.1447950649744e+01, 0.1673046366289e+02,
5948 0.1433408296083e-06, 0.4457854692961e+01, 0.7342457794669e+01,
5949 0.1234701666518e-06, 0.1538818147151e+01, 0.6279485555400e+01,
5950 0.1234027192007e-06, 0.1968523220760e+01, 0.6286666145492e+01,
5951 0.1244024091797e-06, 0.5779803499985e+01, 0.1511046609763e+02,
5952 0.1097934945516e-06, 0.6210975221388e+00, 0.1098880815746e+02,
5953
5954 0.1254611329856e-06, 0.2591963807998e+01, 0.1572083878776e+02,
5955 0.1158247286784e-06, 0.2483612812670e+01, 0.5729506548653e+01,
5956 0.9039078252960e-07, 0.3857554579796e+01, 0.9623688285163e+01,
5957 0.9108024978836e-07, 0.5826368512984e+01, 0.7234794171227e+01,
5958 0.8887068108436e-07, 0.3475694573987e+01, 0.6148010737701e+01,
5959 0.8632374035438e-07, 0.3059070488983e-01, 0.6418140963190e+01,
5960 0.7893186992967e-07, 0.1583194837728e+01, 0.2118763888447e+01,
5961 0.8297650201172e-07, 0.8519770534637e+00, 0.1471231707864e+02,
5962 0.1019759578988e-06, 0.1319598738732e+00, 0.1349867339771e+01,
5963 0.1010037696236e-06, 0.9937860115618e+00, 0.6836645152238e+01,
5964
5965 0.1047727548266e-06, 0.1382138405399e+01, 0.5999216516294e+01,
5966 0.7351993881086e-07, 0.3833397851735e+01, 0.6040347114260e+01,
5967 0.9868771092341e-07, 0.2124913814390e+01, 0.6566935184597e+01,
5968 0.7007321959390e-07, 0.5946305343763e+01, 0.6525804586632e+01,
5969 0.6861411679709e-07, 0.4574654977089e+01, 0.7238675589263e+01,
5970 0.7554519809614e-07, 0.5949232686844e+01, 0.1253985337760e+02,
5971 0.9541880448335e-07, 0.3495242990564e+01, 0.2122839202813e+02,
5972 0.7185606722155e-07, 0.4310113471661e+01, 0.6245048154254e+01,
5973 0.7131360871710e-07, 0.5480309323650e+01, 0.6321103546637e+01,
5974 0.6651142021039e-07, 0.5411097713654e+01, 0.5327476111629e+01,
5975
5976 0.8538618213667e-07, 0.1827849973951e+01, 0.1101510648075e+02,
5977 0.8634954288044e-07, 0.5443584943349e+01, 0.5643178611111e+01,
5978 0.7449415051484e-07, 0.2011535459060e+01, 0.5368044267797e+00,
5979 0.7421047599169e-07, 0.3464562529249e+01, 0.2354323048545e+02,
5980 0.6140694354424e-07, 0.5657556228815e+01, 0.1296430071988e+02,
5981 0.6353525143033e-07, 0.3463816593821e+01, 0.1990745094947e+01,
5982 0.6221964013447e-07, 0.1532259498697e+01, 0.9517183207817e+00,
5983 0.5852480257244e-07, 0.1375396598875e+01, 0.9555997388169e+00,
5984 0.6398637498911e-07, 0.2405645801972e+01, 0.2407292145756e+02,
5985 0.7039744069878e-07, 0.5397541799027e+01, 0.5225775174439e+00,
5986
5987 0.6977997694382e-07, 0.4762347105419e+01, 0.1097355562493e+02,
5988 0.7460629558396e-07, 0.2711944692164e+01, 0.2200391463820e+02,
5989 0.5376577536101e-07, 0.2352980430239e+01, 0.1431416805965e+02,
5990 0.7530607893556e-07, 0.1943940180699e+01, 0.1842262939178e+02,
5991 0.6822928971605e-07, 0.4337651846959e+01, 0.1554202828031e+00,
5992 0.6220772380094e-07, 0.6716871369278e+00, 0.1845107853235e+02,
5993 0.6586950799043e-07, 0.2229714460505e+01, 0.5216580451554e+01,
5994 0.5873800565771e-07, 0.7627013920580e+00, 0.6398972393349e+00,
5995 0.6264346929745e-07, 0.6202785478961e+00, 0.6277552955062e+01,
5996 0.6257929115669e-07, 0.2886775596668e+01, 0.6288598745829e+01,
5997
5998 0.5343536033409e-07, 0.1977241012051e+01, 0.4690479774488e+01,
5999 0.5587849781714e-07, 0.1922923484825e+01, 0.1551045220144e+01,
6000 0.6905100845603e-07, 0.3570757164631e+01, 0.1030928125552e+00,
6001 0.6178957066649e-07, 0.5197558947765e+01, 0.5230807360890e+01,
6002 0.6187270224331e-07, 0.8193497368922e+00, 0.5650292065779e+01,
6003 0.5385664291426e-07, 0.5406336665586e+01, 0.7771377146812e+02,
6004 0.6329363917926e-07, 0.2837760654536e+01, 0.2608790314060e+02,
6005 0.4546018761604e-07, 0.2933580297050e+01, 0.5535693017924e+00,
6006 0.6196091049375e-07, 0.4157871494377e+01, 0.8467247584405e+02,
6007 0.6159555108218e-07, 0.3211703561703e+01, 0.2394243902548e+03,
6008
6009 0.4995340539317e-07, 0.1459098102922e+01, 0.4732030630302e+01,
6010 0.5457031243572e-07, 0.1430457676136e+01, 0.6179983037890e+01,
6011 0.4863461418397e-07, 0.2196425916730e+01, 0.9027992316901e+02,
6012 0.5342947626870e-07, 0.2086612890268e+01, 0.6386168663001e+01,
6013 0.5674296648439e-07, 0.2760204966535e+01, 0.6915859635113e+01,
6014 0.4745783120161e-07, 0.4245368971862e+01, 0.6282970628506e+01,
6015 0.4745676961198e-07, 0.5544725787016e+01, 0.6283181072386e+01,
6016 0.4049796869973e-07, 0.2213984363586e+01, 0.6254626709878e+01,
6017 0.4248333596940e-07, 0.8075781952896e+00, 0.7875671926403e+01,
6018 0.4027178070205e-07, 0.1293268540378e+01, 0.6311524991013e+01,
6019
6020 0.4066543943476e-07, 0.3986141175804e+01, 0.3634620989887e+01,
6021 0.4858863787880e-07, 0.1276112738231e+01, 0.5760498333002e+01,
6022 0.5277398263530e-07, 0.4916111741527e+01, 0.2515860172507e+02,
6023 0.4105635656559e-07, 0.1725805864426e+01, 0.6709674010002e+01,
6024 0.4376781925772e-07, 0.2243642442106e+01, 0.6805653367890e+01,
6025 0.3235827894693e-07, 0.3614135118271e+01, 0.1066495398892e+01,
6026 0.3073244740308e-07, 0.2460873393460e+01, 0.5863591145557e+01,
6027 0.3088609271373e-07, 0.5678431771790e+01, 0.9917696840332e+01,
6028 0.3393022279836e-07, 0.3814017477291e+01, 0.1391601904066e+02,
6029 0.3038686508802e-07, 0.4660216229171e+01, 0.1256621883632e+02,
6030
6031 0.4019677752497e-07, 0.5906906243735e+01, 0.1334167431096e+02,
6032 0.3288834998232e-07, 0.9536146445882e+00, 0.1620077269078e+02,
6033 0.3889973794631e-07, 0.3942205097644e+01, 0.7478166569050e-01,
6034 0.3050438987141e-07, 0.1624810271286e+01, 0.1805292951336e+02,
6035 0.3601142564638e-07, 0.4030467142575e+01, 0.6208294184755e+01,
6036 0.3689015557141e-07, 0.3648878818694e+01, 0.5966683958112e+01,
6037 0.3563471893565e-07, 0.5749584017096e+01, 0.6357857516136e+01,
6038 0.2776183170667e-07, 0.2630124187070e+01, 0.3523159621801e-02,
6039 0.2922350530341e-07, 0.1790346403629e+01, 0.1272157198369e+02,
6040 0.3511076917302e-07, 0.6142198301611e+01, 0.6599467742779e+01,
6041
6042 0.3619351007632e-07, 0.1432421386492e+01, 0.6019991944201e+01,
6043 0.2561254711098e-07, 0.2302822475792e+01, 0.1259245002418e+02,
6044 0.2626903942920e-07, 0.8660470994571e+00, 0.6702560555334e+01,
6045 0.2550187397083e-07, 0.6069721995383e+01, 0.1057540660594e+02,
6046 0.2535873526138e-07, 0.1079020331795e-01, 0.3141537925223e+02,
6047 0.3519786153847e-07, 0.3809066902283e+01, 0.2505706758577e+03,
6048 0.3424651492873e-07, 0.2075435114417e+01, 0.6546159756691e+01,
6049 0.2372676630861e-07, 0.2057803120154e+01, 0.2388894113936e+01,
6050 0.2710980779541e-07, 0.1510068488010e+01, 0.1202934727411e+02,
6051 0.3038710889704e-07, 0.5043617528901e+01, 0.1256608456547e+02,
6052
6053 0.2220364130585e-07, 0.3694793218205e+01, 0.1336244973887e+02,
6054 0.3025880825460e-07, 0.5450618999049e-01, 0.2908881142201e+02,
6055 0.2784493486864e-07, 0.3381164084502e+01, 0.1494531617769e+02,
6056 0.2294414142438e-07, 0.4382309025210e+01, 0.6076890225335e+01,
6057 0.2012723294724e-07, 0.9142212256518e+00, 0.6262720680387e+01,
6058 0.2036357831958e-07, 0.5676172293154e+01, 0.4701116388778e+01,
6059 0.2003474823288e-07, 0.2592767977625e+01, 0.6303431020504e+01,
6060 0.2207144900109e-07, 0.5404976271180e+01, 0.6489261475556e+01,
6061 0.2481664905135e-07, 0.4373284587027e+01, 0.1204357418345e+02,
6062 0.2674949182295e-07, 0.5859182188482e+01, 0.4590910121555e+01,
6063
6064 0.2450554720322e-07, 0.4555381557451e+01, 0.1495633313810e+00,
6065 0.2601975986457e-07, 0.3933165584959e+01, 0.1965104848470e+02,
6066 0.2199860022848e-07, 0.5227977189087e+01, 0.1351787002167e+02,
6067 0.2448121172316e-07, 0.4858060353949e+01, 0.1162474756779e+01,
6068 0.1876014864049e-07, 0.5690546553605e+01, 0.6279194432410e+01,
6069 0.1874513219396e-07, 0.4099539297446e+01, 0.6286957268481e+01,
6070 0.2156380842559e-07, 0.4382594769913e+00, 0.1813929450232e+02,
6071 0.1981691240061e-07, 0.1829784152444e+01, 0.4686889479442e+01,
6072 0.2329992648539e-07, 0.2836254278973e+01, 0.1002183730415e+02,
6073 0.1765184135302e-07, 0.2803494925833e+01, 0.4292330755499e+01,
6074
6075 0.2436368366085e-07, 0.2836897959677e+01, 0.9514313292143e+02,
6076 0.2164089203889e-07, 0.6127522446024e+01, 0.6037244212485e+01,
6077 0.1847755034221e-07, 0.3683163635008e+01, 0.2427287361862e+00,
6078 0.1674798769966e-07, 0.3316993867246e+00, 0.1311972100268e+02,
6079 0.2222542124356e-07, 0.8294097805480e+00, 0.1266924451345e+02,
6080 0.2071074505925e-07, 0.3659492220261e+01, 0.6528907488406e+01,
6081 0.1608224471835e-07, 0.4774492067182e+01, 0.1352175143971e+02,
6082 0.1857583439071e-07, 0.2873120597682e+01, 0.8662240327241e+01,
6083 0.1793018836159e-07, 0.5282441177929e+00, 0.6819880277225e+01,
6084 0.1575391221692e-07, 0.1320789654258e+01, 0.1102062672231e+00,
6085
6086 0.1840132009557e-07, 0.1917110916256e+01, 0.6514761976723e+02,
6087 0.1760917288281e-07, 0.2972635937132e+01, 0.5746271423666e+01,
6088 0.1561779518516e-07, 0.4372569261981e+01, 0.6272439236156e+01,
6089 0.1558687885205e-07, 0.5416424926425e+01, 0.6293712464735e+01,
6090 0.1951359382579e-07, 0.3094448898752e+01, 0.2301353951334e+02,
6091 0.1569144275614e-07, 0.2802103689808e+01, 0.1765478049437e+02,
6092 0.1479130389462e-07, 0.2136435020467e+01, 0.2077542790660e-01,
6093 0.1467828510764e-07, 0.7072627435674e+00, 0.1052268489556e+01,
6094 0.1627627337440e-07, 0.3947607143237e+01, 0.6327837846670e+00,
6095 0.1503498479758e-07, 0.4079248909190e+01, 0.7626583626240e-01,
6096
6097 0.1297967708237e-07, 0.6269637122840e+01, 0.1149965630200e+02,
6098 0.1374416896634e-07, 0.4175657970702e+01, 0.6016468784579e+01,
6099 0.1783812325219e-07, 0.1476540547560e+01, 0.3301902111895e+02,
6100 0.1525884228756e-07, 0.4653477715241e+01, 0.9411464614024e+01,
6101 0.1451067396763e-07, 0.2573001128225e+01, 0.1277945078067e+02,
6102 0.1297713111950e-07, 0.5612799618771e+01, 0.6549682916313e+01,
6103 0.1462784012820e-07, 0.4189661623870e+01, 0.1863592847156e+02,
6104 0.1384185980007e-07, 0.2656915472196e+01, 0.2379164476796e+01,
6105 0.1221497599801e-07, 0.5612515760138e+01, 0.1257326515556e+02,
6106 0.1560574525896e-07, 0.4783414317919e+01, 0.1887552587463e+02,
6107
6108 0.1544598372036e-07, 0.2694431138063e+01, 0.1820933031200e+02,
6109 0.1531678928696e-07, 0.4105103489666e+01, 0.2593412433514e+02,
6110 0.1349321503795e-07, 0.3082437194015e+00, 0.5120601093667e+01,
6111 0.1252030290917e-07, 0.6124072334087e+01, 0.6993008899458e+01,
6112 0.1459243816687e-07, 0.3733103981697e+01, 0.3813291813120e-01,
6113 0.1226103625262e-07, 0.1267127706817e+01, 0.2435678079171e+02,
6114 0.1019449641504e-07, 0.4367790112269e+01, 0.1725663147538e+02,
6115 0.1380789433607e-07, 0.3387201768700e+01, 0.2458316379602e+00,
6116 0.1019453421658e-07, 0.9204143073737e+00, 0.6112403035119e+01,
6117 0.1297929434405e-07, 0.5786874896426e+01, 0.1249137003520e+02,
6118
6119 0.9912677786097e-08, 0.3164232870746e+01, 0.6247047890016e+01,
6120 0.9829386098599e-08, 0.2586762413351e+01, 0.6453748665772e+01,
6121 0.1226807746104e-07, 0.6239068436607e+01, 0.5429879531333e+01,
6122 0.1192691755997e-07, 0.1867380051424e+01, 0.6290122169689e+01,
6123 0.9836499227081e-08, 0.3424716293727e+00, 0.6319103810876e+01,
6124 0.9642862564285e-08, 0.5661372990657e+01, 0.8273820945392e+01,
6125 0.1165184404862e-07, 0.5768367239093e+01, 0.1778273215245e+02,
6126 0.1175794418818e-07, 0.1657351222943e+01, 0.6276029531202e+01,
6127 0.1018948635601e-07, 0.6458292350865e+00, 0.1254537627298e+02,
6128 0.9500383606676e-08, 0.1054306140741e+01, 0.1256517118505e+02,
6129
6130 0.1227512202906e-07, 0.2505278379114e+01, 0.2248384854122e+02,
6131 0.9664792009993e-08, 0.4289737277000e+01, 0.6259197520765e+01,
6132 0.9613285666331e-08, 0.5500597673141e+01, 0.6306954180126e+01,
6133 0.1117906736211e-07, 0.2361405953468e+01, 0.1779695906178e+02,
6134 0.9611378640782e-08, 0.2851310576269e+01, 0.2061856251104e+00,
6135 0.8845354852370e-08, 0.6208777705343e+01, 0.1692165728891e+01,
6136 0.1054046966600e-07, 0.5413091423934e+01, 0.2204125344462e+00,
6137 0.1215539124483e-07, 0.5613969479755e+01, 0.8257698122054e+02,
6138 0.9932460955209e-08, 0.1106124877015e+01, 0.1017725758696e+02,
6139 0.8785804715043e-08, 0.2869224476477e+01, 0.9491756770005e+00,
6140
6141 0.8538084097562e-08, 0.6159640899344e+01, 0.6393282117669e+01,
6142 0.8648994369529e-08, 0.1374901198784e+01, 0.4804209201333e+01,
6143 0.1039063219067e-07, 0.5171080641327e+01, 0.1550861511662e+02,
6144 0.8867983926439e-08, 0.8317320304902e+00, 0.3903911373650e+01,
6145 0.8327495955244e-08, 0.3605591969180e+01, 0.6172869583223e+01,
6146 0.9243088356133e-08, 0.6114299196843e+01, 0.6267823317922e+01,
6147 0.9205657357835e-08, 0.3675153683737e+01, 0.6298328382969e+01,
6148 0.1033269714606e-07, 0.3313328813024e+01, 0.5573142801433e+01,
6149 0.8001706275552e-08, 0.2019980960053e+01, 0.2648454860559e+01,
6150 0.9171858254191e-08, 0.8992015524177e+00, 0.1498544001348e+03,
6151
6152 0.1075327150242e-07, 0.2898669963648e+01, 0.3694923081589e+02,
6153 0.9884866689828e-08, 0.4946715904478e+01, 0.1140367694411e+02,
6154 0.9541835576677e-08, 0.2371787888469e+01, 0.1256713221673e+02,
6155 0.7739903376237e-08, 0.2213775190612e+01, 0.7834121070590e+01,
6156 0.7311962684106e-08, 0.3429378787739e+01, 0.1192625446156e+02,
6157 0.9724904869624e-08, 0.6195878564404e+01, 0.2280573557157e+02,
6158 0.9251628983612e-08, 0.6511509527390e+00, 0.2787043132925e+01,
6159 0.7320763787842e-08, 0.6001083639421e+01, 0.6282655592598e+01,
6160 0.7320296650962e-08, 0.3789073265087e+01, 0.6283496108294e+01,
6161 0.7947032271039e-08, 0.1059659582204e+01, 0.1241073141809e+02,
6162
6163 0.9005277053115e-08, 0.1280315624361e+01, 0.6281591679874e+01,
6164 0.8995601652048e-08, 0.2224439106766e+01, 0.6284560021018e+01,
6165 0.8288040568796e-08, 0.5234914433867e+01, 0.1241658836951e+02,
6166 0.6359381347255e-08, 0.4137989441490e+01, 0.1596186371003e+01,
6167 0.8699572228626e-08, 0.1758411009497e+01, 0.6133512519065e+01,
6168 0.6456797542736e-08, 0.5919285089994e+01, 0.1685848245639e+02,
6169 0.7424573475452e-08, 0.5414616938827e+01, 0.4061219149443e+01,
6170 0.7235671196168e-08, 0.1496516557134e+01, 0.1610006857377e+03,
6171 0.8104015182733e-08, 0.1919918242764e+01, 0.8460828644453e+00,
6172 0.8098576535937e-08, 0.3819615855458e+01, 0.3894181736510e+01,
6173
6174 0.6275292346625e-08, 0.6244264115141e+01, 0.8531963191132e+00,
6175 0.6052432989112e-08, 0.5037731872610e+00, 0.1567108171867e+02,
6176 0.5705651535817e-08, 0.2984557271995e+01, 0.1258692712880e+02,
6177 0.5789650115138e-08, 0.6087038140697e+01, 0.1193336791622e+02,
6178 0.5512132153377e-08, 0.5855668994076e+01, 0.1232342296471e+02,
6179 0.7388890819102e-08, 0.2443128574740e+01, 0.4907302013889e+01,
6180 0.5467593991798e-08, 0.3017561234194e+01, 0.1884211409667e+02,
6181 0.6388519802999e-08, 0.5887386712935e+01, 0.5217580628120e+02,
6182 0.6106777149944e-08, 0.3483461059895e+00, 0.1422690933580e-01,
6183 0.7383420275489e-08, 0.5417387056707e+01, 0.2358125818164e+02,
6184
6185 0.5505208141738e-08, 0.2848193644783e+01, 0.1151388321134e+02,
6186 0.6310757462877e-08, 0.2349882520828e+01, 0.1041998632314e+02,
6187 0.6166904929691e-08, 0.5728575944077e+00, 0.6151533897323e+01,
6188 0.5263442042754e-08, 0.4495796125937e+01, 0.1885275071096e+02,
6189 0.5591828082629e-08, 0.1355441967677e+01, 0.4337116142245e+00,
6190 0.5397051680497e-08, 0.1673422864307e+01, 0.6286362197481e+01,
6191 0.5396992745159e-08, 0.1833502206373e+01, 0.6279789503410e+01,
6192 0.6572913000726e-08, 0.3331122065824e+01, 0.1176433076753e+02,
6193 0.5123421866413e-08, 0.2165327142679e+01, 0.1245594543367e+02,
6194 0.5930495725999e-08, 0.2931146089284e+01, 0.6414617803568e+01,
6195
6196 0.6431797403933e-08, 0.4134407994088e+01, 0.1350651127443e+00,
6197 0.5003182207604e-08, 0.3805420303749e+01, 0.1096996532989e+02,
6198 0.5587731032504e-08, 0.1082469260599e+01, 0.6062663316000e+01,
6199 0.5935263407816e-08, 0.8384333678401e+00, 0.5326786718777e+01,
6200 0.4756019827760e-08, 0.3552588749309e+01, 0.3104930017775e+01,
6201 0.6599951172637e-08, 0.4320826409528e+01, 0.4087944051283e+02,
6202 0.5902606868464e-08, 0.4811879454445e+01, 0.5849364236221e+01,
6203 0.5921147809031e-08, 0.9942628922396e-01, 0.1581959461667e+01,
6204 0.5505382581266e-08, 0.2466557607764e+01, 0.6503488384892e+01,
6205 0.5353771071862e-08, 0.4551978748683e+01, 0.1735668374386e+03,
6206
6207 0.5063282210946e-08, 0.5710812312425e+01, 0.1248988586463e+02,
6208 0.5926120403383e-08, 0.1333998428358e+01, 0.2673594526851e+02,
6209 0.5211016176149e-08, 0.4649315360760e+01, 0.2460261242967e+02,
6210 0.5347075084894e-08, 0.5512754081205e+01, 0.4171425416666e+01,
6211 0.4872609773574e-08, 0.1308025299938e+01, 0.5333900173445e+01,
6212 0.4727711321420e-08, 0.2144908368062e+01, 0.7232251527446e+01,
6213 0.6029426018652e-08, 0.5567259412084e+01, 0.3227113045244e+03,
6214 0.4321485284369e-08, 0.5230667156451e+01, 0.9388005868221e+01,
6215 0.4476406760553e-08, 0.6134081115303e+01, 0.5547199253223e+01,
6216 0.5835268277420e-08, 0.4783808492071e+01, 0.7285056171570e+02,
6217
6218 0.5172183602748e-08, 0.5161817911099e+01, 0.1884570439172e+02,
6219 0.5693571465184e-08, 0.1381646203111e+01, 0.9723862754494e+02,
6220 0.4060634965349e-08, 0.3876705259495e+00, 0.4274518229222e+01,
6221 0.3967398770473e-08, 0.5029491776223e+01, 0.3496032717521e+01,
6222 0.3943754005255e-08, 0.1923162955490e+01, 0.6244942932314e+01,
6223 0.4781323427824e-08, 0.4633332586423e+01, 0.2929661536378e+02,
6224 0.3871483781204e-08, 0.1616650009743e+01, 0.6321208768577e+01,
6225 0.5141741733997e-08, 0.9817316704659e-01, 0.1232032006293e+02,
6226 0.4002385978497e-08, 0.3656161212139e+01, 0.7018952447668e+01,
6227 0.4901092604097e-08, 0.4404098713092e+01, 0.1478866649112e+01,
6228
6229 0.3740932630345e-08, 0.5181188732639e+00, 0.6922973089781e+01,
6230 0.4387283718538e-08, 0.3254859566869e+01, 0.2331413144044e+03,
6231 0.5019197802033e-08, 0.3086773224677e+01, 0.1715706182245e+02,
6232 0.3834931695175e-08, 0.2797882673542e+01, 0.1491901785440e+02,
6233 0.3760413942497e-08, 0.2892676280217e+01, 0.1726726808967e+02,
6234 0.3719717204628e-08, 0.5861046025739e+01, 0.6297302759782e+01,
6235 0.4145623530149e-08, 0.2168239627033e+01, 0.1376059875786e+02,
6236 0.3932788425380e-08, 0.6271811124181e+01, 0.7872148766781e+01,
6237 0.3686377476857e-08, 0.3936853151404e+01, 0.6268848941110e+01,
6238 0.3779077950339e-08, 0.1404148734043e+01, 0.4157198507331e+01,
6239
6240 0.4091334550598e-08, 0.2452436180854e+01, 0.9779108567966e+01,
6241 0.3926694536146e-08, 0.6102292739040e+01, 0.1098419223922e+02,
6242 0.4841000253289e-08, 0.6072760457276e+01, 0.1252801878276e+02,
6243 0.4949340130240e-08, 0.1154832815171e+01, 0.1617106187867e+03,
6244 0.3761557737360e-08, 0.5527545321897e+01, 0.3185192151914e+01,
6245 0.3647396268188e-08, 0.1525035688629e+01, 0.6271346477544e+01,
6246 0.3932405074189e-08, 0.5570681040569e+01, 0.2139354194808e+02,
6247 0.3631322501141e-08, 0.1981240601160e+01, 0.6294805223347e+01,
6248 0.4130007425139e-08, 0.2050060880201e+01, 0.2195415756911e+02,
6249 0.4433905965176e-08, 0.3277477970321e+01, 0.7445550607224e+01,
6250
6251 0.3851814176947e-08, 0.5210690074886e+01, 0.9562891316684e+00,
6252 0.3485807052785e-08, 0.6653274904611e+00, 0.1161697602389e+02,
6253 0.3979772816991e-08, 0.1767941436148e+01, 0.2277943724828e+02,
6254 0.3402607460500e-08, 0.3421746306465e+01, 0.1087398597200e+02,
6255 0.4049993000926e-08, 0.1127144787547e+01, 0.3163918923335e+00,
6256 0.3420511182382e-08, 0.4214794779161e+01, 0.1362553364512e+02,
6257 0.3640772365012e-08, 0.5324905497687e+01, 0.1725304118033e+02,
6258 0.3323037987501e-08, 0.6135761838271e+01, 0.6279143387820e+01,
6259 0.4503141663637e-08, 0.1802305450666e+01, 0.1385561574497e+01,
6260 0.4314560055588e-08, 0.4812299731574e+01, 0.4176041334900e+01,
6261
6262 0.3294226949110e-08, 0.3657547059723e+01, 0.6287008313071e+01,
6263 0.3215657197281e-08, 0.4866676894425e+01, 0.5749861718712e+01,
6264 0.4129362656266e-08, 0.3809342558906e+01, 0.5905702259363e+01,
6265 0.3137762976388e-08, 0.2494635174443e+01, 0.2099539292909e+02,
6266 0.3514010952384e-08, 0.2699961831678e+01, 0.7335344340001e+01,
6267 0.3327607571530e-08, 0.3318457714816e+01, 0.5436992986000e+01,
6268 0.3541066946675e-08, 0.4382703582466e+01, 0.1234573916645e+02,
6269 0.3216179847052e-08, 0.5271066317054e+01, 0.3802769619140e-01,
6270 0.2959045059570e-08, 0.5819591585302e+01, 0.2670964694522e+02,
6271 0.3884040326665e-08, 0.5980934960428e+01, 0.6660449441528e+01,
6272
6273 0.2922027539886e-08, 0.3337290282483e+01, 0.1375773836557e+01,
6274 0.4110846382042e-08, 0.5742978187327e+01, 0.4480965020977e+02,
6275 0.2934508411032e-08, 0.2278075804200e+01, 0.6408777551755e+00,
6276 0.3966896193000e-08, 0.5835747858477e+01, 0.3773735910827e+00,
6277 0.3286695827610e-08, 0.5838898193902e+01, 0.3932462625300e-02,
6278 0.3720643094196e-08, 0.1122212337858e+01, 0.1646033343740e+02,
6279 0.3285508906174e-08, 0.9182250996416e+00, 0.1081813534213e+02,
6280 0.3753880575973e-08, 0.5174761973266e+01, 0.5642198095270e+01,
6281 0.3022129385587e-08, 0.3381611020639e+01, 0.2982630633589e+02,
6282 0.2798569205621e-08, 0.3546193723922e+01, 0.1937891852345e+02,
6283
6284 0.3397872070505e-08, 0.4533203197934e+01, 0.6923953605621e+01,
6285 0.3708099772977e-08, 0.2756168198616e+01, 0.3066615496545e+02,
6286 0.3599283541510e-08, 0.1934395469918e+01, 0.6147450479709e+01,
6287 0.3688702753059e-08, 0.7149920971109e+00, 0.2636725487657e+01,
6288 0.2681084724003e-08, 0.4899819493154e+01, 0.6816289982179e+01,
6289 0.3495993460759e-08, 0.1572418915115e+01, 0.6418701221183e+01,
6290 0.3130770324995e-08, 0.8912190180489e+00, 0.1235996607578e+02,
6291 0.2744353821941e-08, 0.3800821940055e+01, 0.2059724391010e+02,
6292 0.2842732906341e-08, 0.2644717440029e+01, 0.2828699048865e+02,
6293 0.3046882682154e-08, 0.3987793020179e+01, 0.6055599646783e+01,
6294
6295 0.2399072455143e-08, 0.9908826440764e+00, 0.6255674361143e+01,
6296 0.2384306274204e-08, 0.2516149752220e+01, 0.6310477339748e+01,
6297 0.2977324500559e-08, 0.5849195642118e+01, 0.1652265972112e+02,
6298 0.3062835258972e-08, 0.1681660100162e+01, 0.1172006883645e+02,
6299 0.3109682589231e-08, 0.5804143987737e+00, 0.2751146787858e+02,
6300 0.2903920355299e-08, 0.5800768280123e+01, 0.6510552054109e+01,
6301 0.2823221989212e-08, 0.9241118370216e+00, 0.5469525544182e+01,
6302 0.3187949696649e-08, 0.3139776445735e+01, 0.1693792562116e+03,
6303 0.2922559771655e-08, 0.3549440782984e+01, 0.2630839062450e+00,
6304 0.2436302066603e-08, 0.4735540696319e+01, 0.3946258593675e+00,
6305
6306 0.3049473043606e-08, 0.4998289124561e+01, 0.8390110365991e+01,
6307 0.2863682575784e-08, 0.6709515671102e+00, 0.2243449970715e+00,
6308 0.2641750517966e-08, 0.5410978257284e+01, 0.2986433403208e+02,
6309 0.2704093466243e-08, 0.4778317207821e+01, 0.6129297044991e+01,
6310 0.2445522177011e-08, 0.6009020662222e+01, 0.1171295538178e+02,
6311 0.2623608810230e-08, 0.5010449777147e+01, 0.6436854655901e+01,
6312 0.2079259704053e-08, 0.5980943768809e+01, 0.2019909489111e+02,
6313 0.2820225596771e-08, 0.2679965110468e+01, 0.5934151399930e+01,
6314 0.2365221950927e-08, 0.1894231148810e+01, 0.2470570524223e+02,
6315 0.2359682077149e-08, 0.4220752950780e+01, 0.8671969964381e+01,
6316
6317 0.2387577137206e-08, 0.2571783940617e+01, 0.7096626156709e+01,
6318 0.1982102089816e-08, 0.5169765997119e+00, 0.1727188400790e+02,
6319 0.2687502389925e-08, 0.6239078264579e+01, 0.7075506709219e+02,
6320 0.2207751669135e-08, 0.2031184412677e+01, 0.4377611041777e+01,
6321 0.2618370214274e-08, 0.8266079985979e+00, 0.6632000300961e+01,
6322 0.2591951887361e-08, 0.8819350522008e+00, 0.4873985990671e+02,
6323 0.2375055656248e-08, 0.3520944177789e+01, 0.1590676413561e+02,
6324 0.2472019978911e-08, 0.1551431908671e+01, 0.6612329252343e+00,
6325 0.2368157127199e-08, 0.4178610147412e+01, 0.3459636466239e+02,
6326 0.1764846605693e-08, 0.1506764000157e+01, 0.1980094587212e+02,
6327
6328 0.2291769608798e-08, 0.2118250611782e+01, 0.2844914056730e-01,
6329 0.2209997316943e-08, 0.3363255261678e+01, 0.2666070658668e+00,
6330 0.2292699097923e-08, 0.4200423956460e+00, 0.1484170571900e-02,
6331 0.1629683015329e-08, 0.2331362582487e+01, 0.3035599730800e+02,
6332 0.2206492862426e-08, 0.3400274026992e+01, 0.6281667977667e+01,
6333 0.2205746568257e-08, 0.1066051230724e+00, 0.6284483723224e+01,
6334 0.2026310767991e-08, 0.2779066487979e+01, 0.2449240616245e+02,
6335 0.1762977622163e-08, 0.9951450691840e+00, 0.2045286941806e+02,
6336 0.1368535049606e-08, 0.6402447365817e+00, 0.2473415438279e+02,
6337 0.1720598775450e-08, 0.2303524214705e+00, 0.1679593901136e+03,
6338
6339 0.1702429015449e-08, 0.6164622655048e+01, 0.3338575901272e+03,
6340 0.1414033197685e-08, 0.3954561185580e+01, 0.1624205518357e+03,
6341 0.1573768958043e-08, 0.2028286308984e+01, 0.3144167757552e+02,
6342 0.1650705184447e-08, 0.2304040666128e+01, 0.5267006960365e+02,
6343 0.1651087618855e-08, 0.2538461057280e+01, 0.8956999012000e+02,
6344 0.1616409518983e-08, 0.5111054348152e+01, 0.3332657872986e+02,
6345 0.1537175173581e-08, 0.5601130666603e+01, 0.3852657435933e+02,
6346 0.1593191980553e-08, 0.2614340453411e+01, 0.2282781046519e+03,
6347 0.1499480170643e-08, 0.3624721577264e+01, 0.2823723341956e+02,
6348 0.1493807843235e-08, 0.4214569879008e+01, 0.2876692439167e+02,
6349
6350 0.1074571199328e-08, 0.1496911744704e+00, 0.8397383534231e+02,
6351 0.1074406983417e-08, 0.1187817671922e+01, 0.8401985929482e+02,
6352 0.9757576855851e-09, 0.2655703035858e+01, 0.7826370942180e+02,
6353 0.1258432887565e-08, 0.4969896184844e+01, 0.3115650189215e+03,
6354 0.1240336343282e-08, 0.5192460776926e+01, 0.1784300471910e+03,
6355 0.9016107005164e-09, 0.1960356923057e+01, 0.5886454391678e+02,
6356 0.1135392360918e-08, 0.5082427809068e+01, 0.7842370451713e+02,
6357 0.9216046089565e-09, 0.2793775037273e+01, 0.1014262087719e+03,
6358 0.1061276615030e-08, 0.3726144311409e+01, 0.5660027930059e+02,
6359 0.1010110596263e-08, 0.7404080708937e+00, 0.4245678405627e+02,
6360
6361 0.7217424756199e-09, 0.2697449980577e-01, 0.2457074661053e+03,
6362 0.6912003846756e-09, 0.4253296276335e+01, 0.1679936946371e+03,
6363 0.6871814664847e-09, 0.5148072412354e+01, 0.6053048899753e+02,
6364 0.4887158016343e-09, 0.2153581148294e+01, 0.9656299901946e+02,
6365 0.5161802866314e-09, 0.3852750634351e+01, 0.2442876000072e+03,
6366 0.5652599559057e-09, 0.1233233356270e+01, 0.8365903305582e+02,
6367 0.4710812608586e-09, 0.5610486976767e+01, 0.3164282286739e+03,
6368 0.4909977500324e-09, 0.1639629524123e+01, 0.4059982187939e+03,
6369 0.4772641839378e-09, 0.3737100368583e+01, 0.1805255418145e+03,
6370 0.4487562567153e-09, 0.1158417054478e+00, 0.8433466158131e+02,
6371
6372 0.3943441230497e-09, 0.6243502862796e+00, 0.2568537517081e+03,
6373 0.3952236913598e-09, 0.3510377382385e+01, 0.2449975330562e+03,
6374 0.3788898363417e-09, 0.5916128302299e+01, 0.1568131045107e+03,
6375 0.3738329328831e-09, 0.1042266763456e+01, 0.3948519331910e+03,
6376 0.2451199165151e-09, 0.1166788435700e+01, 0.1435713242844e+03,
6377 0.2436734402904e-09, 0.3254726114901e+01, 0.2268582385539e+03,
6378 0.2213605274325e-09, 0.1687210598530e+01, 0.1658638954901e+03,
6379 0.1491521204829e-09, 0.2657541786794e+01, 0.2219950288015e+03,
6380 0.1474995329744e-09, 0.5013089805819e+01, 0.3052819430710e+03,
6381 0.1661939475656e-09, 0.5495315428418e+01, 0.2526661704812e+03,
6382
6383 0.9015946748003e-10, 0.2236989966505e+01, 0.4171445043968e+03 };
6384
6385 /* Sun-to-Earth, T^0, Z */
6386 static final double e0z[] = {
6387 0.2796207639075e-05, 0.3198701560209e+01, 0.8433466158131e+02,
6388 0.1016042198142e-05, 0.5422360395913e+01, 0.5507553240374e+01,
6389 0.8044305033647e-06, 0.3880222866652e+01, 0.5223693906222e+01,
6390 0.4385347909274e-06, 0.3704369937468e+01, 0.2352866153506e+01,
6391 0.3186156414906e-06, 0.3999639363235e+01, 0.1577343543434e+01,
6392 0.2272412285792e-06, 0.3984738315952e+01, 0.1047747311755e+01,
6393 0.1645620103007e-06, 0.3565412516841e+01, 0.5856477690889e+01,
6394 0.1815836921166e-06, 0.4984507059020e+01, 0.6283075850446e+01,
6395 0.1447461676364e-06, 0.3702753570108e+01, 0.9437762937313e+01,
6396 0.1430760876382e-06, 0.3409658712357e+01, 0.1021328554739e+02,
6397
6398 0.1120445753226e-06, 0.4829561570246e+01, 0.1414349524433e+02,
6399 0.1090232840797e-06, 0.2080729178066e+01, 0.6812766822558e+01,
6400 0.9715727346551e-07, 0.3476295881948e+01, 0.4694002934110e+01,
6401 0.1036267136217e-06, 0.4056639536648e+01, 0.7109288135493e+02,
6402 0.8752665271340e-07, 0.4448159519911e+01, 0.5753384878334e+01,
6403 0.8331864956004e-07, 0.4991704044208e+01, 0.7084896783808e+01,
6404 0.6901658670245e-07, 0.4325358994219e+01, 0.6275962395778e+01,
6405 0.9144536848998e-07, 0.1141826375363e+01, 0.6620890113188e+01,
6406 0.7205085037435e-07, 0.3624344170143e+01, 0.5296909721118e+00,
6407 0.7697874654176e-07, 0.5554257458998e+01, 0.1676215758509e+03,
6408
6409 0.5197545738384e-07, 0.6251760961735e+01, 0.1807370494127e+02,
6410 0.5031345378608e-07, 0.2497341091913e+01, 0.4705732307012e+01,
6411 0.4527110205840e-07, 0.2335079920992e+01, 0.6309374173736e+01,
6412 0.4753355798089e-07, 0.7094148987474e+00, 0.5884926831456e+01,
6413 0.4296951977516e-07, 0.1101916352091e+01, 0.6681224869435e+01,
6414 0.3855341568387e-07, 0.1825495405486e+01, 0.5486777812467e+01,
6415 0.5253930970990e-07, 0.4424740687208e+01, 0.7860419393880e+01,
6416 0.4024630496471e-07, 0.5120498157053e+01, 0.1336797263425e+02,
6417 0.4061069791453e-07, 0.6029771435451e+01, 0.3930209696940e+01,
6418 0.3797883804205e-07, 0.4435193600836e+00, 0.3154687086868e+01,
6419
6420 0.2933033225587e-07, 0.5124157356507e+01, 0.1059381944224e+01,
6421 0.3503000930426e-07, 0.5421830162065e+01, 0.6069776770667e+01,
6422 0.3670096214050e-07, 0.4582101667297e+01, 0.1219403291462e+02,
6423 0.2905609437008e-07, 0.1926566420072e+01, 0.1097707878456e+02,
6424 0.2466827821713e-07, 0.6090174539834e+00, 0.6496374930224e+01,
6425 0.2691647295332e-07, 0.1393432595077e+01, 0.2200391463820e+02,
6426 0.2150554667946e-07, 0.4308671715951e+01, 0.5643178611111e+01,
6427 0.2237481922680e-07, 0.8133968269414e+00, 0.8635942003952e+01,
6428 0.1817741038157e-07, 0.3755205127454e+01, 0.3340612434717e+01,
6429 0.2227820762132e-07, 0.2759558596664e+01, 0.1203646072878e+02,
6430
6431 0.1944713772307e-07, 0.5699645869121e+01, 0.1179062909082e+02,
6432 0.1527340520662e-07, 0.1986749091746e+01, 0.3981490189893e+00,
6433 0.1577282574914e-07, 0.3205017217983e+01, 0.5088628793478e+01,
6434 0.1424738825424e-07, 0.6256747903666e+01, 0.2544314396739e+01,
6435 0.1616563121701e-07, 0.2601671259394e+00, 0.1729818233119e+02,
6436 0.1401210391692e-07, 0.4686939173506e+01, 0.7058598460518e+01,
6437 0.1488726974214e-07, 0.2815862451372e+01, 0.2593412433514e+02,
6438 0.1692626442388e-07, 0.4956894109797e+01, 0.1564752902480e+03,
6439 0.1123571582910e-07, 0.2381192697696e+01, 0.3738761453707e+01,
6440 0.9903308606317e-08, 0.4294851657684e+01, 0.9225539266174e+01,
6441
6442 0.9174533187191e-08, 0.3075171510642e+01, 0.4164311961999e+01,
6443 0.8645985631457e-08, 0.5477534821633e+00, 0.8429241228195e+01,
6444 -0.1085876492688e-07, 0.0000000000000e+00, 0.0000000000000e+00,
6445 0.9264309077815e-08, 0.5968571670097e+01, 0.7079373888424e+01,
6446 0.8243116984954e-08, 0.1489098777643e+01, 0.1044738781244e+02,
6447 0.8268102113708e-08, 0.3512977691983e+01, 0.1150676975667e+02,
6448 0.9043613988227e-08, 0.1290704408221e+00, 0.1101510648075e+02,
6449 0.7432912038789e-08, 0.1991086893337e+01, 0.2608790314060e+02,
6450 0.8586233727285e-08, 0.4238357924414e+01, 0.2986433403208e+02,
6451 0.7612230060131e-08, 0.2911090150166e+01, 0.4732030630302e+01,
6452
6453 0.7097787751408e-08, 0.1908938392390e+01, 0.8031092209206e+01,
6454 0.7640237040175e-08, 0.6129219000168e+00, 0.7962980379786e+00,
6455 0.7070445688081e-08, 0.1380417036651e+01, 0.2146165377750e+01,
6456 0.7690770957702e-08, 0.1680504249084e+01, 0.2122839202813e+02,
6457 0.8051292542594e-08, 0.5127423484511e+01, 0.2942463415728e+01,
6458 0.5902709104515e-08, 0.2020274190917e+01, 0.7755226100720e+00,
6459 0.5134567496462e-08, 0.2606778676418e+01, 0.1256615170089e+02,
6460 0.5525802046102e-08, 0.1613011769663e+01, 0.8018209333619e+00,
6461 0.5880724784221e-08, 0.4604483417236e+01, 0.4690479774488e+01,
6462 0.5211699081370e-08, 0.5718964114193e+01, 0.8827390247185e+01,
6463
6464 0.4891849573562e-08, 0.3689658932196e+01, 0.2132990797783e+00,
6465 0.5150246069997e-08, 0.4099769855122e+01, 0.6480980550449e+02,
6466 0.5102434319633e-08, 0.5660834602509e+01, 0.3379454372902e+02,
6467 0.5083405254252e-08, 0.9842221218974e+00, 0.4136910472696e+01,
6468 0.4206562585682e-08, 0.1341363634163e+00, 0.3128388763578e+01,
6469 0.4663249683579e-08, 0.8130132735866e+00, 0.5216580451554e+01,
6470 0.4099474416530e-08, 0.5791497770644e+01, 0.4265981595566e+00,
6471 0.4628251220767e-08, 0.1249802769331e+01, 0.1572083878776e+02,
6472 0.5024068728142e-08, 0.4795684802743e+01, 0.6290189305114e+01,
6473 0.5120234327758e-08, 0.3810420387208e+01, 0.5230807360890e+01,
6474
6475 0.5524029815280e-08, 0.1029264714351e+01, 0.2397622045175e+03,
6476 0.4757415718860e-08, 0.3528044781779e+01, 0.1649636139783e+02,
6477 0.3915786131127e-08, 0.5593889282646e+01, 0.1589072916335e+01,
6478 0.4869053149991e-08, 0.3299636454433e+01, 0.7632943190217e+01,
6479 0.3649365703729e-08, 0.1286049002584e+01, 0.6206810014183e+01,
6480 0.3992493949002e-08, 0.3100307589464e+01, 0.2515860172507e+02,
6481 0.3320247477418e-08, 0.6212683940807e+01, 0.1216800268190e+02,
6482 0.3287123739696e-08, 0.4699118445928e+01, 0.7234794171227e+01,
6483 0.3472776811103e-08, 0.2630507142004e+01, 0.7342457794669e+01,
6484 0.3423253294767e-08, 0.2946432844305e+01, 0.9623688285163e+01,
6485
6486 0.3896173898244e-08, 0.1224834179264e+01, 0.6438496133249e+01,
6487 0.3388455337924e-08, 0.1543807616351e+01, 0.1494531617769e+02,
6488 0.3062704716523e-08, 0.1191777572310e+01, 0.8662240327241e+01,
6489 0.3270075600400e-08, 0.5483498767737e+01, 0.1194447056968e+01,
6490 0.3101209215259e-08, 0.8000833804348e+00, 0.3772475342596e+02,
6491 0.2780883347311e-08, 0.4077980721888e+00, 0.5863591145557e+01,
6492 0.2903605931824e-08, 0.2617490302147e+01, 0.1965104848470e+02,
6493 0.2682014743119e-08, 0.2634703158290e+01, 0.7238675589263e+01,
6494 0.2534360108492e-08, 0.6102446114873e+01, 0.6836645152238e+01,
6495 0.2392564882509e-08, 0.3681820208691e+01, 0.5849364236221e+01,
6496
6497 0.2656667254856e-08, 0.6216045388886e+01, 0.6133512519065e+01,
6498 0.2331242096773e-08, 0.5864949777744e+01, 0.4535059491685e+01,
6499 0.2287898363668e-08, 0.4566628532802e+01, 0.7477522907414e+01,
6500 0.2336944521306e-08, 0.2442722126930e+01, 0.1137170464392e+02,
6501 0.3156632236269e-08, 0.1626628050682e+01, 0.2509084901204e+03,
6502 0.2982612402766e-08, 0.2803604512609e+01, 0.1748016358760e+01,
6503 0.2774031674807e-08, 0.4654002897158e+01, 0.8223916695780e+02,
6504 0.2295236548638e-08, 0.4326518333253e+01, 0.3378142627421e+00,
6505 0.2190714699873e-08, 0.4519614578328e+01, 0.2908881142201e+02,
6506 0.2191495845045e-08, 0.3012626912549e+01, 0.1673046366289e+02,
6507
6508 0.2492901628386e-08, 0.1290101424052e+00, 0.1543797956245e+03,
6509 0.1993778064319e-08, 0.3864046799414e+01, 0.1778984560711e+02,
6510 0.1898146479022e-08, 0.5053777235891e+01, 0.2042657109477e+02,
6511 0.1918280127634e-08, 0.2222470192548e+01, 0.4165496312290e+02,
6512 0.1916351061607e-08, 0.8719067257774e+00, 0.7737595720538e+02,
6513 0.1834720181466e-08, 0.4031491098040e+01, 0.2358125818164e+02,
6514 0.1249201523806e-08, 0.5938379466835e+01, 0.3301902111895e+02,
6515 0.1477304050539e-08, 0.6544722606797e+00, 0.9548094718417e+02,
6516 0.1264316431249e-08, 0.2059072853236e+01, 0.8399684731857e+02,
6517 0.1203526495039e-08, 0.3644813532605e+01, 0.4558517281984e+02,
6518
6519 0.9221681059831e-09, 0.3241815055602e+01, 0.7805158573086e+02,
6520 0.7849278367646e-09, 0.5043812342457e+01, 0.5217580628120e+02,
6521 0.7983392077387e-09, 0.5000024502753e+01, 0.1501922143975e+03,
6522 0.7925395431654e-09, 0.1398734871821e-01, 0.9061773743175e+02,
6523 0.7640473285886e-09, 0.5067111723130e+01, 0.4951538251678e+02,
6524 0.5398937754482e-09, 0.5597382200075e+01, 0.1613385000004e+03,
6525 0.5626247550193e-09, 0.2601338209422e+01, 0.7318837597844e+02,
6526 0.5525197197855e-09, 0.5814832109256e+01, 0.1432335100216e+03,
6527 0.5407629837898e-09, 0.3384820609076e+01, 0.3230491187871e+03,
6528 0.3856739119801e-09, 0.1072391840473e+01, 0.2334791286671e+03,
6529
6530 0.3856425239987e-09, 0.2369540393327e+01, 0.1739046517013e+03,
6531 0.4350867755983e-09, 0.5255575751082e+01, 0.1620484330494e+03,
6532 0.3844113924996e-09, 0.5482356246182e+01, 0.9757644180768e+02,
6533 0.2854869155431e-09, 0.9573634763143e+00, 0.1697170704744e+03,
6534 0.1719227671416e-09, 0.1887203025202e+01, 0.2265204242912e+03,
6535 0.1527846879755e-09, 0.3982183931157e+01, 0.3341954043900e+03,
6536 0.1128229264847e-09, 0.2787457156298e+01, 0.3119028331842e+03 };
6537
6538 /* Sun-to-Earth, T^1, X */
6539 static final double e1x[] = {
6540 0.1234046326004e-05, 0.0000000000000e+00, 0.0000000000000e+00,
6541 0.5150068824701e-06, 0.6002664557501e+01, 0.1256615170089e+02,
6542 0.1290743923245e-07, 0.5959437664199e+01, 0.1884922755134e+02,
6543 0.1068615564952e-07, 0.2015529654209e+01, 0.6283075850446e+01,
6544 0.2079619142538e-08, 0.1732960531432e+01, 0.6279552690824e+01,
6545 0.2078009243969e-08, 0.4915604476996e+01, 0.6286599010068e+01,
6546 0.6206330058856e-09, 0.3616457953824e+00, 0.4705732307012e+01,
6547 0.5989335313746e-09, 0.3802607304474e+01, 0.6256777527156e+01,
6548 0.5958495663840e-09, 0.2845866560031e+01, 0.6309374173736e+01,
6549 0.4866923261539e-09, 0.5213203771824e+01, 0.7755226100720e+00,
6550
6551 0.4267785823142e-09, 0.4368189727818e+00, 0.1059381944224e+01,
6552 0.4610675141648e-09, 0.1837249181372e-01, 0.7860419393880e+01,
6553 0.3626989993973e-09, 0.2161590545326e+01, 0.5753384878334e+01,
6554 0.3563071194389e-09, 0.1452631954746e+01, 0.5884926831456e+01,
6555 0.3557015642807e-09, 0.4470593393054e+01, 0.6812766822558e+01,
6556 0.3210412089122e-09, 0.5195926078314e+01, 0.6681224869435e+01,
6557 0.2875473577986e-09, 0.5916256610193e+01, 0.2513230340178e+02,
6558 0.2842913681629e-09, 0.1149902426047e+01, 0.6127655567643e+01,
6559 0.2751248215916e-09, 0.5502088574662e+01, 0.6438496133249e+01,
6560 0.2481432881127e-09, 0.2921989846637e+01, 0.5486777812467e+01,
6561
6562 0.2059885976560e-09, 0.3718070376585e+01, 0.7079373888424e+01,
6563 0.2015522342591e-09, 0.5979395259740e+01, 0.6290189305114e+01,
6564 0.1995364084253e-09, 0.6772087985494e+00, 0.6275962395778e+01,
6565 0.1957436436943e-09, 0.2899210654665e+01, 0.5507553240374e+01,
6566 0.1651609818948e-09, 0.6228206482192e+01, 0.1150676975667e+02,
6567 0.1822980550699e-09, 0.1469348746179e+01, 0.1179062909082e+02,
6568 0.1675223159760e-09, 0.3813910555688e+01, 0.7058598460518e+01,
6569 0.1706491764745e-09, 0.3004380506684e+00, 0.7113454667900e-02,
6570 0.1392952362615e-09, 0.1440393973406e+01, 0.7962980379786e+00,
6571 0.1209868266342e-09, 0.4150425791727e+01, 0.4694002934110e+01,
6572
6573 0.1009827202611e-09, 0.3290040429843e+01, 0.3738761453707e+01,
6574 0.1047261388602e-09, 0.4229590090227e+01, 0.6282095334605e+01,
6575 0.1047006652004e-09, 0.2418967680575e+01, 0.6284056366286e+01,
6576 0.9609993143095e-10, 0.4627943659201e+01, 0.6069776770667e+01,
6577 0.9590900593873e-10, 0.1894393939924e+01, 0.4136910472696e+01,
6578 0.9146249188071e-10, 0.2010647519562e+01, 0.6496374930224e+01,
6579 0.8545274480290e-10, 0.5529846956226e-01, 0.1194447056968e+01,
6580 0.8224377881194e-10, 0.1254304102174e+01, 0.1589072916335e+01,
6581 0.6183529510410e-10, 0.3360862168815e+01, 0.8827390247185e+01,
6582 0.6259255147141e-10, 0.4755628243179e+01, 0.8429241228195e+01,
6583
6584 0.5539291694151e-10, 0.5371746955142e+01, 0.4933208510675e+01,
6585 0.7328259466314e-10, 0.4927699613906e+00, 0.4535059491685e+01,
6586 0.6017835843560e-10, 0.5776682001734e-01, 0.1255903824622e+02,
6587 0.7079827775243e-10, 0.4395059432251e+01, 0.5088628793478e+01,
6588 0.5170358878213e-10, 0.5154062619954e+01, 0.1176985366291e+02,
6589 0.4872301838682e-10, 0.6289611648973e+00, 0.6040347114260e+01,
6590 0.5249869411058e-10, 0.5617272046949e+01, 0.3154687086868e+01,
6591 0.4716172354411e-10, 0.3965901800877e+01, 0.5331357529664e+01,
6592 0.4871214940964e-10, 0.4627507050093e+01, 0.1256967486051e+02,
6593 0.4598076850751e-10, 0.6023631226459e+01, 0.6525804586632e+01,
6594
6595 0.4562196089485e-10, 0.4138562084068e+01, 0.3930209696940e+01,
6596 0.4325493872224e-10, 0.1330845906564e+01, 0.7632943190217e+01,
6597 0.5673781176748e-10, 0.2558752615657e+01, 0.5729506548653e+01,
6598 0.3961436642503e-10, 0.2728071734630e+01, 0.7234794171227e+01,
6599 0.5101868209058e-10, 0.4113444965144e+01, 0.6836645152238e+01,
6600 0.5257043167676e-10, 0.6195089830590e+01, 0.8031092209206e+01,
6601 0.5076613989393e-10, 0.2305124132918e+01, 0.7477522907414e+01,
6602 0.3342169352778e-10, 0.5415998155071e+01, 0.1097707878456e+02,
6603 0.3545881983591e-10, 0.3727160564574e+01, 0.4164311961999e+01,
6604 0.3364063738599e-10, 0.2901121049204e+00, 0.1137170464392e+02,
6605
6606 0.3357039670776e-10, 0.1652229354331e+01, 0.5223693906222e+01,
6607 0.4307412268687e-10, 0.4938909587445e+01, 0.1592596075957e+01,
6608 0.3405769115435e-10, 0.2408890766511e+01, 0.3128388763578e+01,
6609 0.3001926198480e-10, 0.4862239006386e+01, 0.1748016358760e+01,
6610 0.2778264787325e-10, 0.5241168661353e+01, 0.7342457794669e+01,
6611 0.2676159480666e-10, 0.3423593942199e+01, 0.2146165377750e+01,
6612 0.2954273399939e-10, 0.1881721265406e+01, 0.5368044267797e+00,
6613 0.3309362888795e-10, 0.1931525677349e+01, 0.8018209333619e+00,
6614 0.2810283608438e-10, 0.2414659495050e+01, 0.5225775174439e+00,
6615 0.3378045637764e-10, 0.4238019163430e+01, 0.1554202828031e+00,
6616
6617 0.2558134979840e-10, 0.1828225235805e+01, 0.5230807360890e+01,
6618 0.2273755578447e-10, 0.5858184283998e+01, 0.7084896783808e+01,
6619 0.2294176037690e-10, 0.4514589779057e+01, 0.1726015463500e+02,
6620 0.2533506099435e-10, 0.2355717851551e+01, 0.5216580451554e+01,
6621 0.2716685375812e-10, 0.2221003625100e+01, 0.8635942003952e+01,
6622 0.2419043435198e-10, 0.5955704951635e+01, 0.4690479774488e+01,
6623 0.2521232544812e-10, 0.1395676848521e+01, 0.5481254917084e+01,
6624 0.2630195021491e-10, 0.5727468918743e+01, 0.2629832328990e-01,
6625 0.2548395840944e-10, 0.2628351859400e-03, 0.1349867339771e+01 };
6626
6627 /* Sun-to-Earth, T^1, Y */
6628 static final double e1y[] = {
6629 0.9304690546528e-06, 0.0000000000000e+00, 0.0000000000000e+00,
6630 0.5150715570663e-06, 0.4431807116294e+01, 0.1256615170089e+02,
6631 0.1290825411056e-07, 0.4388610039678e+01, 0.1884922755134e+02,
6632 0.4645466665386e-08, 0.5827263376034e+01, 0.6283075850446e+01,
6633 0.2079625310718e-08, 0.1621698662282e+00, 0.6279552690824e+01,
6634 0.2078189850907e-08, 0.3344713435140e+01, 0.6286599010068e+01,
6635 0.6207190138027e-09, 0.5074049319576e+01, 0.4705732307012e+01,
6636 0.5989826532569e-09, 0.2231842216620e+01, 0.6256777527156e+01,
6637 0.5961360812618e-09, 0.1274975769045e+01, 0.6309374173736e+01,
6638 0.4874165471016e-09, 0.3642277426779e+01, 0.7755226100720e+00,
6639
6640 0.4283834034360e-09, 0.5148765510106e+01, 0.1059381944224e+01,
6641 0.4652389287529e-09, 0.4715794792175e+01, 0.7860419393880e+01,
6642 0.3751707476401e-09, 0.6617207370325e+00, 0.5753384878334e+01,
6643 0.3559998806198e-09, 0.6155548875404e+01, 0.5884926831456e+01,
6644 0.3558447558857e-09, 0.2898827297664e+01, 0.6812766822558e+01,
6645 0.3211116927106e-09, 0.3625813502509e+01, 0.6681224869435e+01,
6646 0.2875609914672e-09, 0.4345435813134e+01, 0.2513230340178e+02,
6647 0.2843109704069e-09, 0.5862263940038e+01, 0.6127655567643e+01,
6648 0.2744676468427e-09, 0.3926419475089e+01, 0.6438496133249e+01,
6649 0.2481285237789e-09, 0.1351976572828e+01, 0.5486777812467e+01,
6650
6651 0.2060338481033e-09, 0.2147556998591e+01, 0.7079373888424e+01,
6652 0.2015822358331e-09, 0.4408358972216e+01, 0.6290189305114e+01,
6653 0.2001195944195e-09, 0.5385829822531e+01, 0.6275962395778e+01,
6654 0.1953667642377e-09, 0.1304933746120e+01, 0.5507553240374e+01,
6655 0.1839744078713e-09, 0.6173567228835e+01, 0.1179062909082e+02,
6656 0.1643334294845e-09, 0.4635942997523e+01, 0.1150676975667e+02,
6657 0.1768051018652e-09, 0.5086283558874e+01, 0.7113454667900e-02,
6658 0.1674874205489e-09, 0.2243332137241e+01, 0.7058598460518e+01,
6659 0.1421445397609e-09, 0.6186899771515e+01, 0.7962980379786e+00,
6660 0.1255163958267e-09, 0.5730238465658e+01, 0.4694002934110e+01,
6661
6662 0.1013945281961e-09, 0.1726055228402e+01, 0.3738761453707e+01,
6663 0.1047294335852e-09, 0.2658801228129e+01, 0.6282095334605e+01,
6664 0.1047103879392e-09, 0.8481047835035e+00, 0.6284056366286e+01,
6665 0.9530343962826e-10, 0.3079267149859e+01, 0.6069776770667e+01,
6666 0.9604637611690e-10, 0.3258679792918e+00, 0.4136910472696e+01,
6667 0.9153518537177e-10, 0.4398599886584e+00, 0.6496374930224e+01,
6668 0.8562458214922e-10, 0.4772686794145e+01, 0.1194447056968e+01,
6669 0.8232525360654e-10, 0.5966220721679e+01, 0.1589072916335e+01,
6670 0.6150223411438e-10, 0.1780985591923e+01, 0.8827390247185e+01,
6671 0.6272087858000e-10, 0.3184305429012e+01, 0.8429241228195e+01,
6672
6673 0.5540476311040e-10, 0.3801260595433e+01, 0.4933208510675e+01,
6674 0.7331901699361e-10, 0.5205948591865e+01, 0.4535059491685e+01,
6675 0.6018528702791e-10, 0.4770139083623e+01, 0.1255903824622e+02,
6676 0.5150530724804e-10, 0.3574796899585e+01, 0.1176985366291e+02,
6677 0.6471933741811e-10, 0.2679787266521e+01, 0.5088628793478e+01,
6678 0.5317460644174e-10, 0.9528763345494e+00, 0.3154687086868e+01,
6679 0.4832187748783e-10, 0.5329322498232e+01, 0.6040347114260e+01,
6680 0.4716763555110e-10, 0.2395235316466e+01, 0.5331357529664e+01,
6681 0.4871509139861e-10, 0.3056663648823e+01, 0.1256967486051e+02,
6682 0.4598417696768e-10, 0.4452762609019e+01, 0.6525804586632e+01,
6683
6684 0.5674189533175e-10, 0.9879680872193e+00, 0.5729506548653e+01,
6685 0.4073560328195e-10, 0.5939127696986e+01, 0.7632943190217e+01,
6686 0.5040994945359e-10, 0.4549875824510e+01, 0.8031092209206e+01,
6687 0.5078185134679e-10, 0.7346659893982e+00, 0.7477522907414e+01,
6688 0.3769343537061e-10, 0.1071317188367e+01, 0.7234794171227e+01,
6689 0.4980331365299e-10, 0.2500345341784e+01, 0.6836645152238e+01,
6690 0.3458236594757e-10, 0.3825159450711e+01, 0.1097707878456e+02,
6691 0.3578859493602e-10, 0.5299664791549e+01, 0.4164311961999e+01,
6692 0.3370504646419e-10, 0.5002316301593e+01, 0.1137170464392e+02,
6693 0.3299873338428e-10, 0.2526123275282e+01, 0.3930209696940e+01,
6694
6695 0.4304917318409e-10, 0.3368078557132e+01, 0.1592596075957e+01,
6696 0.3402418753455e-10, 0.8385495425800e+00, 0.3128388763578e+01,
6697 0.2778460572146e-10, 0.3669905203240e+01, 0.7342457794669e+01,
6698 0.2782710128902e-10, 0.2691664812170e+00, 0.1748016358760e+01,
6699 0.2711725179646e-10, 0.4707487217718e+01, 0.5296909721118e+00,
6700 0.2981760946340e-10, 0.3190260867816e+00, 0.5368044267797e+00,
6701 0.2811672977772e-10, 0.3196532315372e+01, 0.7084896783808e+01,
6702 0.2863454474467e-10, 0.2263240324780e+00, 0.5223693906222e+01,
6703 0.3333464634051e-10, 0.3498451685065e+01, 0.8018209333619e+00,
6704 0.3312991747609e-10, 0.5839154477412e+01, 0.1554202828031e+00,
6705
6706 0.2813255564006e-10, 0.8268044346621e+00, 0.5225775174439e+00,
6707 0.2665098083966e-10, 0.3934021725360e+01, 0.5216580451554e+01,
6708 0.2349795705216e-10, 0.5197620913779e+01, 0.2146165377750e+01,
6709 0.2330352293961e-10, 0.2984999231807e+01, 0.1726015463500e+02,
6710 0.2728001683419e-10, 0.6521679638544e+00, 0.8635942003952e+01,
6711 0.2484061007669e-10, 0.3468955561097e+01, 0.5230807360890e+01,
6712 0.2646328768427e-10, 0.1013724533516e+01, 0.2629832328990e-01,
6713 0.2518630264831e-10, 0.6108081057122e+01, 0.5481254917084e+01,
6714 0.2421901455384e-10, 0.1651097776260e+01, 0.1349867339771e+01,
6715 0.6348533267831e-11, 0.3220226560321e+01, 0.8433466158131e+02 };
6716
6717 /* Sun-to-Earth, T^1, Z */
6718 static final double e1z[] = {
6719 0.2278290449966e-05, 0.3413716033863e+01, 0.6283075850446e+01,
6720 0.5429458209830e-07, 0.0000000000000e+00, 0.0000000000000e+00,
6721 0.1903240492525e-07, 0.3370592358297e+01, 0.1256615170089e+02,
6722 0.2385409276743e-09, 0.3327914718416e+01, 0.1884922755134e+02,
6723 0.8676928342573e-10, 0.1824006811264e+01, 0.5223693906222e+01,
6724 0.7765442593544e-10, 0.3888564279247e+01, 0.5507553240374e+01,
6725 0.7066158332715e-10, 0.5194267231944e+01, 0.2352866153506e+01,
6726 0.7092175288657e-10, 0.2333246960021e+01, 0.8399684731857e+02,
6727 0.5357582213535e-10, 0.2224031176619e+01, 0.5296909721118e+00,
6728 0.3828035865021e-10, 0.2156710933584e+01, 0.6279552690824e+01,
6729
6730 0.3824857220427e-10, 0.1529755219915e+01, 0.6286599010068e+01,
6731 0.3286995181628e-10, 0.4879512900483e+01, 0.1021328554739e+02 };
6732
6733 /* Sun-to-Earth, T^2, X */
6734 static final double e2x[] = {
6735 -0.4143818297913e-10, 0.0000000000000e+00, 0.0000000000000e+00,
6736 0.2171497694435e-10, 0.4398225628264e+01, 0.1256615170089e+02,
6737 0.9845398442516e-11, 0.2079720838384e+00, 0.6283075850446e+01,
6738 0.9256833552682e-12, 0.4191264694361e+01, 0.1884922755134e+02,
6739 0.1022049384115e-12, 0.5381133195658e+01, 0.8399684731857e+02 };
6740
6741 /* Sun-to-Earth, T^2, Y */
6742 static final double e2y[] = {
6743 0.5063375872532e-10, 0.0000000000000e+00, 0.0000000000000e+00,
6744 0.2173815785980e-10, 0.2827805833053e+01, 0.1256615170089e+02,
6745 0.1010231999920e-10, 0.4634612377133e+01, 0.6283075850446e+01,
6746 0.9259745317636e-12, 0.2620612076189e+01, 0.1884922755134e+02,
6747 0.1022202095812e-12, 0.3809562326066e+01, 0.8399684731857e+02 };
6748
6749 /* Sun-to-Earth, T^2, Z */
6750 static final double e2z[] = {
6751 0.9722666114891e-10, 0.5152219582658e+01, 0.6283075850446e+01,
6752 -0.3494819171909e-11, 0.0000000000000e+00, 0.0000000000000e+00,
6753 0.6713034376076e-12, 0.6440188750495e+00, 0.1256615170089e+02 };
6754
6755 }
6756 //subclassed the
6757 private static class SSB {
6758 /* SSB-to-Sun, T^0, X */
6759 static final double s0x[] = {
6760 0.4956757536410e-02, 0.3741073751789e+01, 0.5296909721118e+00,
6761 0.2718490072522e-02, 0.4016011511425e+01, 0.2132990797783e+00,
6762 0.1546493974344e-02, 0.2170528330642e+01, 0.3813291813120e-01,
6763 0.8366855276341e-03, 0.2339614075294e+01, 0.7478166569050e-01,
6764 0.2936777942117e-03, 0.0000000000000e+00, 0.0000000000000e+00,
6765 0.1201317439469e-03, 0.4090736353305e+01, 0.1059381944224e+01,
6766 0.7578550887230e-04, 0.3241518088140e+01, 0.4265981595566e+00,
6767 0.1941787367773e-04, 0.1012202064330e+01, 0.2061856251104e+00,
6768 0.1889227765991e-04, 0.3892520416440e+01, 0.2204125344462e+00,
6769 0.1937896968613e-04, 0.4797779441161e+01, 0.1495633313810e+00,
6770
6771 0.1434506110873e-04, 0.3868960697933e+01, 0.5225775174439e+00,
6772 0.1406659911580e-04, 0.4759766557397e+00, 0.5368044267797e+00,
6773 0.1179022300202e-04, 0.7774961520598e+00, 0.7626583626240e-01,
6774 0.8085864460959e-05, 0.3254654471465e+01, 0.3664874755930e-01,
6775 0.7622752967615e-05, 0.4227633103489e+01, 0.3961708870310e-01,
6776 0.6209171139066e-05, 0.2791828325711e+00, 0.7329749511860e-01,
6777 0.4366435633970e-05, 0.4440454875925e+01, 0.1589072916335e+01,
6778 0.3792124889348e-05, 0.5156393842356e+01, 0.7113454667900e-02,
6779 0.3154548963402e-05, 0.6157005730093e+01, 0.4194847048887e+00,
6780 0.3088359882942e-05, 0.2494567553163e+01, 0.6398972393349e+00,
6781
6782 0.2788440902136e-05, 0.4934318747989e+01, 0.1102062672231e+00,
6783 0.3039928456376e-05, 0.4895077702640e+01, 0.6283075850446e+01,
6784 0.2272258457679e-05, 0.5278394064764e+01, 0.1030928125552e+00,
6785 0.2162007057957e-05, 0.5802978019099e+01, 0.3163918923335e+00,
6786 0.1767632855737e-05, 0.3415346595193e-01, 0.1021328554739e+02,
6787 0.1349413459362e-05, 0.2001643230755e+01, 0.1484170571900e-02,
6788 0.1170141900476e-05, 0.2424750491620e+01, 0.6327837846670e+00,
6789 0.1054355266820e-05, 0.3123311487576e+01, 0.4337116142245e+00,
6790 0.9800822461610e-06, 0.3026258088130e+01, 0.1052268489556e+01,
6791 0.1091203749931e-05, 0.3157811670347e+01, 0.1162474756779e+01,
6792
6793 0.6960236715913e-06, 0.8219570542313e+00, 0.1066495398892e+01,
6794 0.5689257296909e-06, 0.1323052375236e+01, 0.9491756770005e+00,
6795 0.6613172135802e-06, 0.2765348881598e+00, 0.8460828644453e+00,
6796 0.6277702517571e-06, 0.5794064466382e+01, 0.1480791608091e+00,
6797 0.6304884066699e-06, 0.7323555380787e+00, 0.2243449970715e+00,
6798 0.4897850467382e-06, 0.3062464235399e+01, 0.3340612434717e+01,
6799 0.3759148598786e-06, 0.4588290469664e+01, 0.3516457698740e-01,
6800 0.3110520548195e-06, 0.1374299536572e+01, 0.6373574839730e-01,
6801 0.3064708359780e-06, 0.4222267485047e+01, 0.1104591729320e-01,
6802 0.2856347168241e-06, 0.3714202944973e+01, 0.1510475019529e+00,
6803
6804 0.2840945514288e-06, 0.2847972875882e+01, 0.4110125927500e-01,
6805 0.2378951599405e-06, 0.3762072563388e+01, 0.2275259891141e+00,
6806 0.2714229481417e-06, 0.1036049980031e+01, 0.2535050500000e-01,
6807 0.2323551717307e-06, 0.4682388599076e+00, 0.8582758298370e-01,
6808 0.1881790512219e-06, 0.4790565425418e+01, 0.2118763888447e+01,
6809 0.2261353968371e-06, 0.1669144912212e+01, 0.7181332454670e-01,
6810 0.2214546389848e-06, 0.3937717281614e+01, 0.2968341143800e-02,
6811 0.2184915594933e-06, 0.1129169845099e+00, 0.7775000683430e-01,
6812 0.2000164937936e-06, 0.4030009638488e+01, 0.2093666171530e+00,
6813 0.1966105136719e-06, 0.8745955786834e+00, 0.2172315424036e+00,
6814
6815 0.1904742332624e-06, 0.5919743598964e+01, 0.2022531624851e+00,
6816 0.1657399705031e-06, 0.2549141484884e+01, 0.7358765972222e+00,
6817 0.1574070533987e-06, 0.5277533020230e+01, 0.7429900518901e+00,
6818 0.1832261651039e-06, 0.3064688127777e+01, 0.3235053470014e+00,
6819 0.1733615346569e-06, 0.3011432799094e+01, 0.1385174140878e+00,
6820 0.1549124014496e-06, 0.4005569132359e+01, 0.5154640627760e+00,
6821 0.1637044713838e-06, 0.1831375966632e+01, 0.8531963191132e+00,
6822 0.1123420082383e-06, 0.1180270407578e+01, 0.1990721704425e+00,
6823 0.1083754165740e-06, 0.3414101320863e+00, 0.5439178814476e+00,
6824 0.1156638012655e-06, 0.6130479452594e+00, 0.5257585094865e+00,
6825
6826 0.1142548785134e-06, 0.3724761948846e+01, 0.5336234347371e+00,
6827 0.7921463895965e-07, 0.2435425589361e+01, 0.1478866649112e+01,
6828 0.7428600285231e-07, 0.3542144398753e+01, 0.2164800718209e+00,
6829 0.8323211246747e-07, 0.3525058072354e+01, 0.1692165728891e+01,
6830 0.7257595116312e-07, 0.1364299431982e+01, 0.2101180877357e+00,
6831 0.7111185833236e-07, 0.2460478875808e+01, 0.4155522422634e+00,
6832 0.6868090383716e-07, 0.4397327670704e+01, 0.1173197218910e+00,
6833 0.7226419974175e-07, 0.4042647308905e+01, 0.1265567569334e+01,
6834 0.6955642383177e-07, 0.2865047906085e+01, 0.9562891316684e+00,
6835 0.7492139296331e-07, 0.5014278994215e+01, 0.1422690933580e-01,
6836
6837 0.6598363128857e-07, 0.2376730020492e+01, 0.6470106940028e+00,
6838 0.7381147293385e-07, 0.3272990384244e+01, 0.1581959461667e+01,
6839 0.6402909624032e-07, 0.5302290955138e+01, 0.9597935788730e-01,
6840 0.6237454263857e-07, 0.5444144425332e+01, 0.7084920306520e-01,
6841 0.5241198544016e-07, 0.4215359579205e+01, 0.5265099800692e+00,
6842 0.5144463853918e-07, 0.1218916689916e+00, 0.5328719641544e+00,
6843 0.5868164772299e-07, 0.2369402002213e+01, 0.7871412831580e-01,
6844 0.6233195669151e-07, 0.1254922242403e+01, 0.2608790314060e+02,
6845 0.6068463791422e-07, 0.5679713760431e+01, 0.1114304132498e+00,
6846 0.4359361135065e-07, 0.6097219641646e+00, 0.1375773836557e+01,
6847
6848 0.4686510366826e-07, 0.4786231041431e+01, 0.1143987543936e+00,
6849 0.3758977287225e-07, 0.1167368068139e+01, 0.1596186371003e+01,
6850 0.4282051974778e-07, 0.1519471064319e+01, 0.2770348281756e+00,
6851 0.5153765386113e-07, 0.1860532322984e+01, 0.2228608264996e+00,
6852 0.4575129387188e-07, 0.7632857887158e+00, 0.1465949902372e+00,
6853 0.3326844933286e-07, 0.1298219485285e+01, 0.5070101000000e-01,
6854 0.3748617450984e-07, 0.1046510321062e+01, 0.4903339079539e+00,
6855 0.2816756661499e-07, 0.3434522346190e+01, 0.2991266627620e+00,
6856 0.3412750405039e-07, 0.2523766270318e+01, 0.3518164938661e+00,
6857 0.2655796761776e-07, 0.2904422260194e+01, 0.6256703299991e+00,
6858
6859 0.2963597929458e-07, 0.5923900431149e+00, 0.1099462426779e+00,
6860 0.2539523734781e-07, 0.4851947722567e+01, 0.1256615170089e+02,
6861 0.2283087914139e-07, 0.3400498595496e+01, 0.6681224869435e+01,
6862 0.2321309799331e-07, 0.5789099148673e+01, 0.3368040641550e-01,
6863 0.2549657649750e-07, 0.3991856479792e-01, 0.1169588211447e+01,
6864 0.2290462303977e-07, 0.2788567577052e+01, 0.1045155034888e+01,
6865 0.1945398522914e-07, 0.3290896998176e+01, 0.1155361302111e+01,
6866 0.1849171512638e-07, 0.2698060129367e+01, 0.4452511715700e-02,
6867 0.1647199834254e-07, 0.3016735644085e+01, 0.4408250688924e+00,
6868 0.1529530765273e-07, 0.5573043116178e+01, 0.6521991896920e-01,
6869
6870 0.1433199339978e-07, 0.1481192356147e+01, 0.9420622223326e+00,
6871 0.1729134193602e-07, 0.1422817538933e+01, 0.2108507877249e+00,
6872 0.1716463931346e-07, 0.3469468901855e+01, 0.2157473718317e+00,
6873 0.1391206061378e-07, 0.6122436220547e+01, 0.4123712502208e+00,
6874 0.1404746661924e-07, 0.1647765641936e+01, 0.4258542984690e-01,
6875 0.1410452399455e-07, 0.5989729161964e+01, 0.2258291676434e+00,
6876 0.1089828772168e-07, 0.2833705509371e+01, 0.4226656969313e+00,
6877 0.1047374564948e-07, 0.5090690007331e+00, 0.3092784376656e+00,
6878 0.1358279126532e-07, 0.5128990262836e+01, 0.7923417740620e-01,
6879 0.1020456476148e-07, 0.9632772880808e+00, 0.1456308687557e+00,
6880
6881 0.1033428735328e-07, 0.3223779318418e+01, 0.1795258541446e+01,
6882 0.1412435841540e-07, 0.2410271572721e+01, 0.1525316725248e+00,
6883 0.9722759371574e-08, 0.2333531395690e+01, 0.8434341241180e-01,
6884 0.9657334084704e-08, 0.6199270974168e+01, 0.1272681024002e+01,
6885 0.1083641148690e-07, 0.2864222292929e+01, 0.7032915397480e-01,
6886 0.1067318403838e-07, 0.5833458866568e+00, 0.2123349582968e+00,
6887 0.1062366201976e-07, 0.4307753989494e+01, 0.2142632012598e+00,
6888 0.1236364149266e-07, 0.2873917870593e+01, 0.1847279083684e+00,
6889 0.1092759489593e-07, 0.2959887266733e+01, 0.1370332435159e+00,
6890 0.8912069362899e-08, 0.5141213702562e+01, 0.2648454860559e+01,
6891
6892 0.9656467707970e-08, 0.4532182462323e+01, 0.4376440768498e+00,
6893 0.8098386150135e-08, 0.2268906338379e+01, 0.2880807454688e+00,
6894 0.7857714675000e-08, 0.4055544260745e+01, 0.2037373330570e+00,
6895 0.7288455940646e-08, 0.5357901655142e+01, 0.1129145838217e+00,
6896 0.9450595950552e-08, 0.4264926963939e+01, 0.5272426800584e+00,
6897 0.9381718247537e-08, 0.7489366976576e-01, 0.5321392641652e+00,
6898 0.7079052646038e-08, 0.1923311052874e+01, 0.6288513220417e+00,
6899 0.9259004415344e-08, 0.2970256853438e+01, 0.1606092486742e+00,
6900 0.8259801499742e-08, 0.3327056314697e+01, 0.8389694097774e+00,
6901 0.6476334355779e-08, 0.2954925505727e+01, 0.2008557621224e+01,
6902
6903 0.5984021492007e-08, 0.9138753105829e+00, 0.2042657109477e+02,
6904 0.5989546863181e-08, 0.3244464082031e+01, 0.2111650433779e+01,
6905 0.6233108606023e-08, 0.4995232638403e+00, 0.4305306221819e+00,
6906 0.6877299149965e-08, 0.2834987233449e+01, 0.9561746721300e-02,
6907 0.8311234227190e-08, 0.2202951835758e+01, 0.3801276407308e+00,
6908 0.6599472832414e-08, 0.4478581462618e+01, 0.1063314406849e+01,
6909 0.6160491096549e-08, 0.5145858696411e+01, 0.1368660381889e+01,
6910 0.6164772043891e-08, 0.3762976697911e+00, 0.4234171675140e+00,
6911 0.6363248684450e-08, 0.3162246718685e+01, 0.1253008786510e-01,
6912 0.6448587520999e-08, 0.3442693302119e+01, 0.5287268506303e+00,
6913
6914 0.6431662283977e-08, 0.8977549136606e+00, 0.5306550935933e+00,
6915 0.6351223158474e-08, 0.4306447410369e+01, 0.5217580628120e+02,
6916 0.5476721393451e-08, 0.3888529177855e+01, 0.2221856701002e+01,
6917 0.5341772572619e-08, 0.2655560662512e+01, 0.7466759693650e-01,
6918 0.5337055758302e-08, 0.5164990735946e+01, 0.7489573444450e-01,
6919 0.5373120816787e-08, 0.6041214553456e+01, 0.1274714967946e+00,
6920 0.5392351705426e-08, 0.9177763485932e+00, 0.1055449481598e+01,
6921 0.6688495850205e-08, 0.3089608126937e+01, 0.2213766559277e+00,
6922 0.5072003660362e-08, 0.4311316541553e+01, 0.2132517061319e+00,
6923 0.5070726650455e-08, 0.5790675464444e+00, 0.2133464534247e+00,
6924
6925 0.5658012950032e-08, 0.2703945510675e+01, 0.7287631425543e+00,
6926 0.4835509924854e-08, 0.2975422976065e+01, 0.7160067364790e-01,
6927 0.6479821978012e-08, 0.1324168733114e+01, 0.2209183458640e-01,
6928 0.6230636494980e-08, 0.2860103632836e+01, 0.3306188016693e+00,
6929 0.4649239516213e-08, 0.4832259763403e+01, 0.7796265773310e-01,
6930 0.6487325792700e-08, 0.2726165825042e+01, 0.3884652414254e+00,
6931 0.4682823682770e-08, 0.6966602455408e+00, 0.1073608853559e+01,
6932 0.5704230804976e-08, 0.5669634104606e+01, 0.8731175355560e-01,
6933 0.6125413585489e-08, 0.1513386538915e+01, 0.7605151500000e-01,
6934 0.6035825038187e-08, 0.1983509168227e+01, 0.9846002785331e+00,
6935
6936 0.4331123462303e-08, 0.2782892992807e+01, 0.4297791515992e+00,
6937 0.4681107685143e-08, 0.5337232886836e+01, 0.2127790306879e+00,
6938 0.4669105829655e-08, 0.5837133792160e+01, 0.2138191288687e+00,
6939 0.5138823602365e-08, 0.3080560200507e+01, 0.7233337363710e-01,
6940 0.4615856664534e-08, 0.1661747897471e+01, 0.8603097737811e+00,
6941 0.4496916702197e-08, 0.2112508027068e+01, 0.7381754420900e-01,
6942 0.4278479042945e-08, 0.5716528462627e+01, 0.7574578717200e-01,
6943 0.3840525503932e-08, 0.6424172726492e+00, 0.3407705765729e+00,
6944 0.4866636509685e-08, 0.4919244697715e+01, 0.7722995774390e-01,
6945 0.3526100639296e-08, 0.2550821052734e+01, 0.6225157782540e-01,
6946
6947 0.3939558488075e-08, 0.3939331491710e+01, 0.5268983110410e-01,
6948 0.4041268772576e-08, 0.2275337571218e+01, 0.3503323232942e+00,
6949 0.3948761842853e-08, 0.1999324200790e+01, 0.1451108196653e+00,
6950 0.3258394550029e-08, 0.9121001378200e+00, 0.5296435984654e+00,
6951 0.3257897048761e-08, 0.3428428660869e+01, 0.5297383457582e+00,
6952 0.3842559031298e-08, 0.6132927720035e+01, 0.9098186128426e+00,
6953 0.3109920095448e-08, 0.7693650193003e+00, 0.3932462625300e-02,
6954 0.3132237775119e-08, 0.3621293854908e+01, 0.2346394437820e+00,
6955 0.3942189421510e-08, 0.4841863659733e+01, 0.3180992042600e-02,
6956 0.3796972285340e-08, 0.1814174994268e+01, 0.1862120789403e+00,
6957
6958 0.3995640233688e-08, 0.1386990406091e+01, 0.4549093064213e+00,
6959 0.2875013727414e-08, 0.9178318587177e+00, 0.1905464808669e+01,
6960 0.3073719932844e-08, 0.2688923811835e+01, 0.3628624111593e+00,
6961 0.2731016580075e-08, 0.1188259127584e+01, 0.2131850110243e+00,
6962 0.2729549896546e-08, 0.3702160634273e+01, 0.2134131485323e+00,
6963 0.3339372892449e-08, 0.7199163960331e+00, 0.2007689919132e+00,
6964 0.2898833764204e-08, 0.1916709364999e+01, 0.5291709230214e+00,
6965 0.2894536549362e-08, 0.2424043195547e+01, 0.5302110212022e+00,
6966 0.3096872473843e-08, 0.4445894977497e+01, 0.2976424921901e+00,
6967 0.2635672326810e-08, 0.3814366984117e+01, 0.1485980103780e+01,
6968
6969 0.3649302697001e-08, 0.2924200596084e+01, 0.6044726378023e+00,
6970 0.3127954585895e-08, 0.1842251648327e+01, 0.1084620721060e+00,
6971 0.2616040173947e-08, 0.4155841921984e+01, 0.1258454114666e+01,
6972 0.2597395859860e-08, 0.1158045978874e+00, 0.2103781122809e+00,
6973 0.2593286172210e-08, 0.4771850408691e+01, 0.2162200472757e+00,
6974 0.2481823585747e-08, 0.4608842558889e+00, 0.1062562936266e+01,
6975 0.2742219550725e-08, 0.1538781127028e+01, 0.5651155736444e+00,
6976 0.3199558469610e-08, 0.3226647822878e+00, 0.7036329877322e+00,
6977 0.2666088542957e-08, 0.1967991731219e+00, 0.1400015846597e+00,
6978 0.2397067430580e-08, 0.3707036669873e+01, 0.2125476091956e+00,
6979
6980 0.2376570772738e-08, 0.1182086628042e+01, 0.2140505503610e+00,
6981 0.2547228007887e-08, 0.4906256820629e+01, 0.1534957940063e+00,
6982 0.2265575594114e-08, 0.3414949866857e+01, 0.2235935264888e+00,
6983 0.2464381430585e-08, 0.4599122275378e+01, 0.2091065926078e+00,
6984 0.2433408527044e-08, 0.2830751145445e+00, 0.2174915669488e+00,
6985 0.2443605509076e-08, 0.4212046432538e+01, 0.1739420156204e+00,
6986 0.2319779262465e-08, 0.9881978408630e+00, 0.7530171478090e-01,
6987 0.2284622835465e-08, 0.5565347331588e+00, 0.7426161660010e-01,
6988 0.2467268750783e-08, 0.5655708150766e+00, 0.2526561439362e+00,
6989 0.2808513492782e-08, 0.1418405053408e+01, 0.5636314030725e+00,
6990
6991 0.2329528932532e-08, 0.4069557545675e+01, 0.1056200952181e+01,
6992 0.9698639532817e-09, 0.1074134313634e+01, 0.7826370942180e+02 };
6993
6994 /* SSB-to-Sun, T^0, Y */
6995 static final double s0y[] = {
6996 0.4955392320126e-02, 0.2170467313679e+01, 0.5296909721118e+00,
6997 0.2722325167392e-02, 0.2444433682196e+01, 0.2132990797783e+00,
6998 0.1546579925346e-02, 0.5992779281546e+00, 0.3813291813120e-01,
6999 0.8363140252966e-03, 0.7687356310801e+00, 0.7478166569050e-01,
7000 0.3385792683603e-03, 0.0000000000000e+00, 0.0000000000000e+00,
7001 0.1201192221613e-03, 0.2520035601514e+01, 0.1059381944224e+01,
7002 0.7587125720554e-04, 0.1669954006449e+01, 0.4265981595566e+00,
7003 0.1964155361250e-04, 0.5707743963343e+01, 0.2061856251104e+00,
7004 0.1891900364909e-04, 0.2320960679937e+01, 0.2204125344462e+00,
7005 0.1937373433356e-04, 0.3226940689555e+01, 0.1495633313810e+00,
7006
7007 0.1437139941351e-04, 0.2301626908096e+01, 0.5225775174439e+00,
7008 0.1406267683099e-04, 0.5188579265542e+01, 0.5368044267797e+00,
7009 0.1178703080346e-04, 0.5489483248476e+01, 0.7626583626240e-01,
7010 0.8079835186041e-05, 0.1683751835264e+01, 0.3664874755930e-01,
7011 0.7623253594652e-05, 0.2656400462961e+01, 0.3961708870310e-01,
7012 0.6248667483971e-05, 0.4992775362055e+01, 0.7329749511860e-01,
7013 0.4366353695038e-05, 0.2869706279678e+01, 0.1589072916335e+01,
7014 0.3829101568895e-05, 0.3572131359950e+01, 0.7113454667900e-02,
7015 0.3175733773908e-05, 0.4535372530045e+01, 0.4194847048887e+00,
7016 0.3092437902159e-05, 0.9230153317909e+00, 0.6398972393349e+00,
7017
7018 0.2874168812154e-05, 0.3363143761101e+01, 0.1102062672231e+00,
7019 0.3040119321826e-05, 0.3324250895675e+01, 0.6283075850446e+01,
7020 0.2699723308006e-05, 0.2917882441928e+00, 0.1030928125552e+00,
7021 0.2134832683534e-05, 0.4220997202487e+01, 0.3163918923335e+00,
7022 0.1770412139433e-05, 0.4747318496462e+01, 0.1021328554739e+02,
7023 0.1377264209373e-05, 0.4305058462401e+00, 0.1484170571900e-02,
7024 0.1127814538960e-05, 0.8538177240740e+00, 0.6327837846670e+00,
7025 0.1055608090130e-05, 0.1551800742580e+01, 0.4337116142245e+00,
7026 0.9802673861420e-06, 0.1459646735377e+01, 0.1052268489556e+01,
7027 0.1090329461951e-05, 0.1587351228711e+01, 0.1162474756779e+01,
7028
7029 0.6959590025090e-06, 0.5534442628766e+01, 0.1066495398892e+01,
7030 0.5664914529542e-06, 0.6030673003297e+01, 0.9491756770005e+00,
7031 0.6607787763599e-06, 0.4989507233927e+01, 0.8460828644453e+00,
7032 0.6269725742838e-06, 0.4222951804572e+01, 0.1480791608091e+00,
7033 0.6301889697863e-06, 0.5444316669126e+01, 0.2243449970715e+00,
7034 0.4891042662861e-06, 0.1490552839784e+01, 0.3340612434717e+01,
7035 0.3457083123290e-06, 0.3030475486049e+01, 0.3516457698740e-01,
7036 0.3032559967314e-06, 0.2652038793632e+01, 0.1104591729320e-01,
7037 0.2841133988903e-06, 0.1276744786829e+01, 0.4110125927500e-01,
7038 0.2855564444432e-06, 0.2143368674733e+01, 0.1510475019529e+00,
7039
7040 0.2765157135038e-06, 0.5444186109077e+01, 0.6373574839730e-01,
7041 0.2382312465034e-06, 0.2190521137593e+01, 0.2275259891141e+00,
7042 0.2808060365077e-06, 0.5735195064841e+01, 0.2535050500000e-01,
7043 0.2332175234405e-06, 0.9481985524859e-01, 0.7181332454670e-01,
7044 0.2322488199659e-06, 0.5180499361533e+01, 0.8582758298370e-01,
7045 0.1881850258423e-06, 0.3219788273885e+01, 0.2118763888447e+01,
7046 0.2196111392808e-06, 0.2366941159761e+01, 0.2968341143800e-02,
7047 0.2183810335519e-06, 0.4825445110915e+01, 0.7775000683430e-01,
7048 0.2002733093326e-06, 0.2457148995307e+01, 0.2093666171530e+00,
7049 0.1967111767229e-06, 0.5586291545459e+01, 0.2172315424036e+00,
7050
7051 0.1568473250543e-06, 0.3708003123320e+01, 0.7429900518901e+00,
7052 0.1852528314300e-06, 0.4310638151560e+01, 0.2022531624851e+00,
7053 0.1832111226447e-06, 0.1494665322656e+01, 0.3235053470014e+00,
7054 0.1746805502310e-06, 0.1451378500784e+01, 0.1385174140878e+00,
7055 0.1555730966650e-06, 0.1068040418198e+01, 0.7358765972222e+00,
7056 0.1554883462559e-06, 0.2442579035461e+01, 0.5154640627760e+00,
7057 0.1638380568746e-06, 0.2597913420625e+00, 0.8531963191132e+00,
7058 0.1159938593640e-06, 0.5834512021280e+01, 0.1990721704425e+00,
7059 0.1083427965695e-06, 0.5054033177950e+01, 0.5439178814476e+00,
7060 0.1156480369431e-06, 0.5325677432457e+01, 0.5257585094865e+00,
7061
7062 0.1141308860095e-06, 0.2153403923857e+01, 0.5336234347371e+00,
7063 0.7913146470946e-07, 0.8642846847027e+00, 0.1478866649112e+01,
7064 0.7439752463733e-07, 0.1970628496213e+01, 0.2164800718209e+00,
7065 0.7280277104079e-07, 0.6073307250609e+01, 0.2101180877357e+00,
7066 0.8319567719136e-07, 0.1954371928334e+01, 0.1692165728891e+01,
7067 0.7137705549290e-07, 0.8904989440909e+00, 0.4155522422634e+00,
7068 0.6900825396225e-07, 0.2825717714977e+01, 0.1173197218910e+00,
7069 0.7245757216635e-07, 0.2481677513331e+01, 0.1265567569334e+01,
7070 0.6961165696255e-07, 0.1292955312978e+01, 0.9562891316684e+00,
7071 0.7571804456890e-07, 0.3427517575069e+01, 0.1422690933580e-01,
7072
7073 0.6605425721904e-07, 0.8052192701492e+00, 0.6470106940028e+00,
7074 0.7375477357248e-07, 0.1705076390088e+01, 0.1581959461667e+01,
7075 0.7041664951470e-07, 0.4848356967891e+00, 0.9597935788730e-01,
7076 0.6322199535763e-07, 0.3878069473909e+01, 0.7084920306520e-01,
7077 0.5244380279191e-07, 0.2645560544125e+01, 0.5265099800692e+00,
7078 0.5143125704988e-07, 0.4834486101370e+01, 0.5328719641544e+00,
7079 0.5871866319373e-07, 0.7981472548900e+00, 0.7871412831580e-01,
7080 0.6300822573871e-07, 0.5979398788281e+01, 0.2608790314060e+02,
7081 0.6062154271548e-07, 0.4108655402756e+01, 0.1114304132498e+00,
7082 0.4361912339976e-07, 0.5322624319280e+01, 0.1375773836557e+01,
7083
7084 0.4417005920067e-07, 0.6240817359284e+01, 0.2770348281756e+00,
7085 0.4686806749936e-07, 0.3214977301156e+01, 0.1143987543936e+00,
7086 0.3758892132305e-07, 0.5879809634765e+01, 0.1596186371003e+01,
7087 0.5151351332319e-07, 0.2893377688007e+00, 0.2228608264996e+00,
7088 0.4554683578572e-07, 0.5475427144122e+01, 0.1465949902372e+00,
7089 0.3442381385338e-07, 0.5992034796640e+01, 0.5070101000000e-01,
7090 0.2831093954933e-07, 0.5367350273914e+01, 0.3092784376656e+00,
7091 0.3756267090084e-07, 0.5758171285420e+01, 0.4903339079539e+00,
7092 0.2816374679892e-07, 0.1863718700923e+01, 0.2991266627620e+00,
7093 0.3419307025569e-07, 0.9524347534130e+00, 0.3518164938661e+00,
7094
7095 0.2904250494239e-07, 0.5304471615602e+01, 0.1099462426779e+00,
7096 0.2471734511206e-07, 0.1297069793530e+01, 0.6256703299991e+00,
7097 0.2539620831872e-07, 0.3281126083375e+01, 0.1256615170089e+02,
7098 0.2281017868007e-07, 0.1829122133165e+01, 0.6681224869435e+01,
7099 0.2275319473335e-07, 0.5797198160181e+01, 0.3932462625300e-02,
7100 0.2547755368442e-07, 0.4752697708330e+01, 0.1169588211447e+01,
7101 0.2285979669317e-07, 0.1223205292886e+01, 0.1045155034888e+01,
7102 0.1913386560994e-07, 0.1757532993389e+01, 0.1155361302111e+01,
7103 0.1809020525147e-07, 0.4246116108791e+01, 0.3368040641550e-01,
7104 0.1649213300201e-07, 0.1445162890627e+01, 0.4408250688924e+00,
7105
7106 0.1834972793932e-07, 0.1126917567225e+01, 0.4452511715700e-02,
7107 0.1439550648138e-07, 0.6160756834764e+01, 0.9420622223326e+00,
7108 0.1487645457041e-07, 0.4358761931792e+01, 0.4123712502208e+00,
7109 0.1731729516660e-07, 0.6134456753344e+01, 0.2108507877249e+00,
7110 0.1717747163567e-07, 0.1898186084455e+01, 0.2157473718317e+00,
7111 0.1418190430374e-07, 0.4180286741266e+01, 0.6521991896920e-01,
7112 0.1404844134873e-07, 0.7654053565412e-01, 0.4258542984690e-01,
7113 0.1409842846538e-07, 0.4418612420312e+01, 0.2258291676434e+00,
7114 0.1090948346291e-07, 0.1260615686131e+01, 0.4226656969313e+00,
7115 0.1357577323612e-07, 0.3558248818690e+01, 0.7923417740620e-01,
7116
7117 0.1018154061960e-07, 0.5676087241256e+01, 0.1456308687557e+00,
7118 0.1412073972109e-07, 0.8394392632422e+00, 0.1525316725248e+00,
7119 0.1030938326496e-07, 0.1653593274064e+01, 0.1795258541446e+01,
7120 0.1180081567104e-07, 0.1285802592036e+01, 0.7032915397480e-01,
7121 0.9708510575650e-08, 0.7631889488106e+00, 0.8434341241180e-01,
7122 0.9637689663447e-08, 0.4630642649176e+01, 0.1272681024002e+01,
7123 0.1068910429389e-07, 0.5294934032165e+01, 0.2123349582968e+00,
7124 0.1063716179336e-07, 0.2736266800832e+01, 0.2142632012598e+00,
7125 0.1234858713814e-07, 0.1302891146570e+01, 0.1847279083684e+00,
7126 0.8912631189738e-08, 0.3570415993621e+01, 0.2648454860559e+01,
7127
7128 0.1036378285534e-07, 0.4236693440949e+01, 0.1370332435159e+00,
7129 0.9667798501561e-08, 0.2960768892398e+01, 0.4376440768498e+00,
7130 0.8108314201902e-08, 0.6987781646841e+00, 0.2880807454688e+00,
7131 0.7648364324628e-08, 0.2499017863863e+01, 0.2037373330570e+00,
7132 0.7286136828406e-08, 0.3787426951665e+01, 0.1129145838217e+00,
7133 0.9448237743913e-08, 0.2694354332983e+01, 0.5272426800584e+00,
7134 0.9374276106428e-08, 0.4787121277064e+01, 0.5321392641652e+00,
7135 0.7100226287462e-08, 0.3530238792101e+00, 0.6288513220417e+00,
7136 0.9253056659571e-08, 0.1399478925664e+01, 0.1606092486742e+00,
7137 0.6636432145504e-08, 0.3479575438447e+01, 0.1368660381889e+01,
7138
7139 0.6469975312932e-08, 0.1383669964800e+01, 0.2008557621224e+01,
7140 0.7335849729765e-08, 0.1243698166898e+01, 0.9561746721300e-02,
7141 0.8743421205855e-08, 0.3776164289301e+01, 0.3801276407308e+00,
7142 0.5993635744494e-08, 0.5627122113596e+01, 0.2042657109477e+02,
7143 0.5981008479693e-08, 0.1674336636752e+01, 0.2111650433779e+01,
7144 0.6188535145838e-08, 0.5214925208672e+01, 0.4305306221819e+00,
7145 0.6596074017566e-08, 0.2907653268124e+01, 0.1063314406849e+01,
7146 0.6630815126226e-08, 0.2127643669658e+01, 0.8389694097774e+00,
7147 0.6156772830040e-08, 0.5082160803295e+01, 0.4234171675140e+00,
7148 0.6446960563014e-08, 0.1872100916905e+01, 0.5287268506303e+00,
7149
7150 0.6429324424668e-08, 0.5610276103577e+01, 0.5306550935933e+00,
7151 0.6302232396465e-08, 0.1592152049607e+01, 0.1253008786510e-01,
7152 0.6399244436159e-08, 0.2746214421532e+01, 0.5217580628120e+02,
7153 0.5474965172558e-08, 0.2317666374383e+01, 0.2221856701002e+01,
7154 0.5339293190692e-08, 0.1084724961156e+01, 0.7466759693650e-01,
7155 0.5334733683389e-08, 0.3594106067745e+01, 0.7489573444450e-01,
7156 0.5392665782110e-08, 0.5630254365606e+01, 0.1055449481598e+01,
7157 0.6682075673789e-08, 0.1518480041732e+01, 0.2213766559277e+00,
7158 0.5079130495960e-08, 0.2739765115711e+01, 0.2132517061319e+00,
7159 0.5077759793261e-08, 0.5290711290094e+01, 0.2133464534247e+00,
7160
7161 0.4832037368310e-08, 0.1404473217200e+01, 0.7160067364790e-01,
7162 0.6463279674802e-08, 0.6038381695210e+01, 0.2209183458640e-01,
7163 0.6240592771560e-08, 0.1290170653666e+01, 0.3306188016693e+00,
7164 0.4672013521493e-08, 0.3261895939677e+01, 0.7796265773310e-01,
7165 0.6500650750348e-08, 0.1154522312095e+01, 0.3884652414254e+00,
7166 0.6344161389053e-08, 0.6206111545062e+01, 0.7605151500000e-01,
7167 0.4682518370646e-08, 0.5409118796685e+01, 0.1073608853559e+01,
7168 0.5329460015591e-08, 0.1202985784864e+01, 0.7287631425543e+00,
7169 0.5701588675898e-08, 0.4098715257064e+01, 0.8731175355560e-01,
7170 0.6030690867211e-08, 0.4132033218460e+00, 0.9846002785331e+00,
7171
7172 0.4336256312655e-08, 0.1211415991827e+01, 0.4297791515992e+00,
7173 0.4688498808975e-08, 0.3765479072409e+01, 0.2127790306879e+00,
7174 0.4675578609335e-08, 0.4265540037226e+01, 0.2138191288687e+00,
7175 0.4225578112158e-08, 0.5237566010676e+01, 0.3407705765729e+00,
7176 0.5139422230028e-08, 0.1507173079513e+01, 0.7233337363710e-01,
7177 0.4619995093571e-08, 0.9023957449848e-01, 0.8603097737811e+00,
7178 0.4494776255461e-08, 0.5414930552139e+00, 0.7381754420900e-01,
7179 0.4274026276788e-08, 0.4145735303659e+01, 0.7574578717200e-01,
7180 0.5018141789353e-08, 0.3344408829055e+01, 0.3180992042600e-02,
7181 0.4866163952181e-08, 0.3348534657607e+01, 0.7722995774390e-01,
7182
7183 0.4111986020501e-08, 0.4198823597220e+00, 0.1451108196653e+00,
7184 0.3356142784950e-08, 0.5609144747180e+01, 0.1274714967946e+00,
7185 0.4070575554551e-08, 0.7028411059224e+00, 0.3503323232942e+00,
7186 0.3257451857278e-08, 0.5624697983086e+01, 0.5296435984654e+00,
7187 0.3256973703026e-08, 0.1857842076707e+01, 0.5297383457582e+00,
7188 0.3830771508640e-08, 0.4562887279931e+01, 0.9098186128426e+00,
7189 0.3725024005962e-08, 0.2358058692652e+00, 0.1084620721060e+00,
7190 0.3136763921756e-08, 0.2049731526845e+01, 0.2346394437820e+00,
7191 0.3795147256194e-08, 0.2432356296933e+00, 0.1862120789403e+00,
7192 0.2877342229911e-08, 0.5631101279387e+01, 0.1905464808669e+01,
7193
7194 0.3076931798805e-08, 0.1117615737392e+01, 0.3628624111593e+00,
7195 0.2734765945273e-08, 0.5899826516955e+01, 0.2131850110243e+00,
7196 0.2733405296885e-08, 0.2130562964070e+01, 0.2134131485323e+00,
7197 0.2898552353410e-08, 0.3462387048225e+00, 0.5291709230214e+00,
7198 0.2893736103681e-08, 0.8534352781543e+00, 0.5302110212022e+00,
7199 0.3095717734137e-08, 0.2875061429041e+01, 0.2976424921901e+00,
7200 0.2636190425832e-08, 0.2242512846659e+01, 0.1485980103780e+01,
7201 0.3645512095537e-08, 0.1354016903958e+01, 0.6044726378023e+00,
7202 0.2808173547723e-08, 0.6705114365631e-01, 0.6225157782540e-01,
7203 0.2625012866888e-08, 0.4775705748482e+01, 0.5268983110410e-01,
7204
7205 0.2572233995651e-08, 0.2638924216139e+01, 0.1258454114666e+01,
7206 0.2604238824792e-08, 0.4826358927373e+01, 0.2103781122809e+00,
7207 0.2596886385239e-08, 0.3200388483118e+01, 0.2162200472757e+00,
7208 0.3228057304264e-08, 0.5384848409563e+01, 0.2007689919132e+00,
7209 0.2481601798252e-08, 0.5173373487744e+01, 0.1062562936266e+01,
7210 0.2745977498864e-08, 0.6250966149853e+01, 0.5651155736444e+00,
7211 0.2669878833811e-08, 0.4906001352499e+01, 0.1400015846597e+00,
7212 0.3203986611711e-08, 0.5034333010005e+01, 0.7036329877322e+00,
7213 0.3354961227212e-08, 0.6108262423137e+01, 0.4549093064213e+00,
7214 0.2400407324558e-08, 0.2135399294955e+01, 0.2125476091956e+00,
7215
7216 0.2379905859802e-08, 0.5893721933961e+01, 0.2140505503610e+00,
7217 0.2550844302187e-08, 0.3331940762063e+01, 0.1534957940063e+00,
7218 0.2268824211001e-08, 0.1843418461035e+01, 0.2235935264888e+00,
7219 0.2464700891204e-08, 0.3029548547230e+01, 0.2091065926078e+00,
7220 0.2436814726024e-08, 0.4994717970364e+01, 0.2174915669488e+00,
7221 0.2443623894745e-08, 0.2645102591375e+01, 0.1739420156204e+00,
7222 0.2318701783838e-08, 0.5700547397897e+01, 0.7530171478090e-01,
7223 0.2284448700256e-08, 0.5268898905872e+01, 0.7426161660010e-01,
7224 0.2468848123510e-08, 0.5276280575078e+01, 0.2526561439362e+00,
7225 0.2814052350303e-08, 0.6130168623475e+01, 0.5636314030725e+00,
7226
7227 0.2243662755220e-08, 0.6631692457995e+00, 0.8886590321940e-01,
7228 0.2330795855941e-08, 0.2499435487702e+01, 0.1056200952181e+01,
7229 0.9757679038404e-09, 0.5796846023126e+01, 0.7826370942180e+02 };
7230
7231 /* SSB-to-Sun, T^0, Z */
7232 static final double s0z[] = {
7233 0.1181255122986e-03, 0.4607918989164e+00, 0.2132990797783e+00,
7234 0.1127777651095e-03, 0.4169146331296e+00, 0.5296909721118e+00,
7235 0.4777754401806e-04, 0.4582657007130e+01, 0.3813291813120e-01,
7236 0.1129354285772e-04, 0.5758735142480e+01, 0.7478166569050e-01,
7237 -0.1149543637123e-04, 0.0000000000000e+00, 0.0000000000000e+00,
7238 0.3298730512306e-05, 0.5978801994625e+01, 0.4265981595566e+00,
7239 0.2733376706079e-05, 0.7665413691040e+00, 0.1059381944224e+01,
7240 0.9426389657270e-06, 0.3710201265838e+01, 0.2061856251104e+00,
7241 0.8187517749552e-06, 0.3390675605802e+00, 0.2204125344462e+00,
7242 0.4080447871819e-06, 0.4552296640088e+00, 0.5225775174439e+00,
7243
7244 0.3169973017028e-06, 0.3445455899321e+01, 0.5368044267797e+00,
7245 0.2438098615549e-06, 0.5664675150648e+01, 0.3664874755930e-01,
7246 0.2601897517235e-06, 0.1931894095697e+01, 0.1495633313810e+00,
7247 0.2314558080079e-06, 0.3666319115574e+00, 0.3961708870310e-01,
7248 0.1962549548002e-06, 0.3167411699020e+01, 0.7626583626240e-01,
7249 0.2180518287925e-06, 0.1544420746580e+01, 0.7113454667900e-02,
7250 0.1451382442868e-06, 0.1583756740070e+01, 0.1102062672231e+00,
7251 0.1358439007389e-06, 0.5239941758280e+01, 0.6398972393349e+00,
7252 0.1050585898028e-06, 0.2266958352859e+01, 0.3163918923335e+00,
7253 0.1050029870186e-06, 0.2711495250354e+01, 0.4194847048887e+00,
7254
7255 0.9934920679800e-07, 0.1116208151396e+01, 0.1589072916335e+01,
7256 0.1048395331560e-06, 0.3408619600206e+01, 0.1021328554739e+02,
7257 0.8370147196668e-07, 0.3810459401087e+01, 0.2535050500000e-01,
7258 0.7989856510998e-07, 0.3769910473647e+01, 0.7329749511860e-01,
7259 0.5441221655233e-07, 0.2416994903374e+01, 0.1030928125552e+00,
7260 0.4610812906784e-07, 0.5858503336994e+01, 0.4337116142245e+00,
7261 0.3923022803444e-07, 0.3354170010125e+00, 0.1484170571900e-02,
7262 0.2610725582128e-07, 0.5410600646324e+01, 0.6327837846670e+00,
7263 0.2455279767721e-07, 0.6120216681403e+01, 0.1162474756779e+01,
7264 0.2375530706525e-07, 0.6055443426143e+01, 0.1052268489556e+01,
7265
7266 0.1782967577553e-07, 0.3146108708004e+01, 0.8460828644453e+00,
7267 0.1581687095238e-07, 0.6255496089819e+00, 0.3340612434717e+01,
7268 0.1594657672461e-07, 0.3782604300261e+01, 0.1066495398892e+01,
7269 0.1563448615040e-07, 0.1997775733196e+01, 0.2022531624851e+00,
7270 0.1463624258525e-07, 0.1736316792088e+00, 0.3516457698740e-01,
7271 0.1331585056673e-07, 0.4331941830747e+01, 0.9491756770005e+00,
7272 0.1130634557637e-07, 0.6152017751825e+01, 0.2968341143800e-02,
7273 0.1028949607145e-07, 0.2101792614637e+00, 0.2275259891141e+00,
7274 0.1024074971618e-07, 0.4071833211074e+01, 0.5070101000000e-01,
7275 0.8826956060303e-08, 0.4861633688145e+00, 0.2093666171530e+00,
7276
7277 0.8572230171541e-08, 0.5268190724302e+01, 0.4110125927500e-01,
7278 0.7649332643544e-08, 0.5134543417106e+01, 0.2608790314060e+02,
7279 0.8581673291033e-08, 0.2920218146681e+01, 0.1480791608091e+00,
7280 0.8430589300938e-08, 0.3604576619108e+01, 0.2172315424036e+00,
7281 0.7776165501012e-08, 0.3772942249792e+01, 0.6373574839730e-01,
7282 0.8311070234408e-08, 0.6200412329888e+01, 0.3235053470014e+00,
7283 0.6927365212582e-08, 0.4543353113437e+01, 0.8531963191132e+00,
7284 0.6791574208598e-08, 0.2882188406238e+01, 0.7181332454670e-01,
7285 0.5593100811839e-08, 0.1776646892780e+01, 0.7429900518901e+00,
7286 0.4553381853021e-08, 0.3949617611240e+01, 0.7775000683430e-01,
7287
7288 0.5758000450068e-08, 0.3859251775075e+01, 0.1990721704425e+00,
7289 0.4281283457133e-08, 0.1466294631206e+01, 0.2118763888447e+01,
7290 0.4206935661097e-08, 0.5421776011706e+01, 0.1104591729320e-01,
7291 0.4213751641837e-08, 0.3412048993322e+01, 0.2243449970715e+00,
7292 0.5310506239878e-08, 0.5421641370995e+00, 0.5154640627760e+00,
7293 0.3827450341320e-08, 0.8887314524995e+00, 0.1510475019529e+00,
7294 0.4292435241187e-08, 0.1405043757194e+01, 0.1422690933580e-01,
7295 0.3189780702289e-08, 0.1060049293445e+01, 0.1173197218910e+00,
7296 0.3226611928069e-08, 0.6270858897442e+01, 0.2164800718209e+00,
7297 0.2893897608830e-08, 0.5117563223301e+01, 0.6470106940028e+00,
7298
7299 0.3239852024578e-08, 0.4079092237983e+01, 0.2101180877357e+00,
7300 0.2956892222200e-08, 0.1594917021704e+01, 0.3092784376656e+00,
7301 0.2980177912437e-08, 0.5258787667564e+01, 0.4155522422634e+00,
7302 0.3163725690776e-08, 0.3854589225479e+01, 0.8582758298370e-01,
7303 0.2662262399118e-08, 0.3561326430187e+01, 0.5257585094865e+00,
7304 0.2766689135729e-08, 0.3180732086830e+00, 0.1385174140878e+00,
7305 0.2411600278464e-08, 0.3324798335058e+01, 0.5439178814476e+00,
7306 0.2483527695131e-08, 0.4169069291947e+00, 0.5336234347371e+00,
7307 0.7788777276590e-09, 0.1900569908215e+01, 0.5217580628120e+02 };
7308
7309 /* SSB-to-Sun, T^1, X */
7310 static final double s1x[] = {
7311 -0.1296310361520e-07, 0.0000000000000e+00, 0.0000000000000e+00,
7312 0.8975769009438e-08, 0.1128891609250e+01, 0.4265981595566e+00,
7313 0.7771113441307e-08, 0.2706039877077e+01, 0.2061856251104e+00,
7314 0.7538303866642e-08, 0.2191281289498e+01, 0.2204125344462e+00,
7315 0.6061384579336e-08, 0.3248167319958e+01, 0.1059381944224e+01,
7316 0.5726994235594e-08, 0.5569981398610e+01, 0.5225775174439e+00,
7317 0.5616492836424e-08, 0.5057386614909e+01, 0.5368044267797e+00,
7318 0.1010881584769e-08, 0.3473577116095e+01, 0.7113454667900e-02,
7319 0.7259606157626e-09, 0.3651858593665e+00, 0.6398972393349e+00,
7320 0.8755095026935e-09, 0.1662835408338e+01, 0.4194847048887e+00,
7321
7322 0.5370491182812e-09, 0.1327673878077e+01, 0.4337116142245e+00,
7323 0.5743773887665e-09, 0.4250200846687e+01, 0.2132990797783e+00,
7324 0.4408103140300e-09, 0.3598752574277e+01, 0.1589072916335e+01,
7325 0.3101892374445e-09, 0.4887822983319e+01, 0.1052268489556e+01,
7326 0.3209453713578e-09, 0.9702272295114e+00, 0.5296909721118e+00,
7327 0.3017228286064e-09, 0.5484462275949e+01, 0.1066495398892e+01,
7328 0.3200700038601e-09, 0.2846613338643e+01, 0.1495633313810e+00,
7329 0.2137637279911e-09, 0.5692163292729e+00, 0.3163918923335e+00,
7330 0.1899686386727e-09, 0.2061077157189e+01, 0.2275259891141e+00,
7331 0.1401994545308e-09, 0.4177771136967e+01, 0.1102062672231e+00,
7332
7333 0.1578057810499e-09, 0.5782460597335e+01, 0.7626583626240e-01,
7334 0.1237713253351e-09, 0.5705900866881e+01, 0.5154640627760e+00,
7335 0.1313076837395e-09, 0.5163438179576e+01, 0.3664874755930e-01,
7336 0.1184963304860e-09, 0.3054804427242e+01, 0.6327837846670e+00,
7337 0.1238130878565e-09, 0.2317292575962e+01, 0.3961708870310e-01,
7338 0.1015959527736e-09, 0.2194643645526e+01, 0.7329749511860e-01,
7339 0.9017954423714e-10, 0.2868603545435e+01, 0.1990721704425e+00,
7340 0.8668024955603e-10, 0.4923849675082e+01, 0.5439178814476e+00,
7341 0.7756083930103e-10, 0.3014334135200e+01, 0.9491756770005e+00,
7342 0.7536503401741e-10, 0.2704886279769e+01, 0.1030928125552e+00,
7343
7344 0.5483308679332e-10, 0.6010983673799e+01, 0.8531963191132e+00,
7345 0.5184339620428e-10, 0.1952704573291e+01, 0.2093666171530e+00,
7346 0.5108658712030e-10, 0.2958575786649e+01, 0.2172315424036e+00,
7347 0.5019424524650e-10, 0.1736317621318e+01, 0.2164800718209e+00,
7348 0.4909312625978e-10, 0.3167216416257e+01, 0.2101180877357e+00,
7349 0.4456638901107e-10, 0.7697579923471e+00, 0.3235053470014e+00,
7350 0.4227030350925e-10, 0.3490910137928e+01, 0.6373574839730e-01,
7351 0.4095456040093e-10, 0.5178888984491e+00, 0.6470106940028e+00,
7352 0.4990537041422e-10, 0.3323887668974e+01, 0.1422690933580e-01,
7353 0.4321170010845e-10, 0.4288484987118e+01, 0.7358765972222e+00,
7354
7355 0.3544072091802e-10, 0.6021051579251e+01, 0.5265099800692e+00,
7356 0.3480198638687e-10, 0.4600027054714e+01, 0.5328719641544e+00,
7357 0.3440287244435e-10, 0.4349525970742e+01, 0.8582758298370e-01,
7358 0.3330628322713e-10, 0.2347391505082e+01, 0.1104591729320e-01,
7359 0.2973060707184e-10, 0.4789409286400e+01, 0.5257585094865e+00,
7360 0.2932606766089e-10, 0.5831693799927e+01, 0.5336234347371e+00,
7361 0.2876972310953e-10, 0.2692638514771e+01, 0.1173197218910e+00,
7362 0.2827488278556e-10, 0.2056052487960e+01, 0.2022531624851e+00,
7363 0.2515028239756e-10, 0.7411863262449e+00, 0.9597935788730e-01,
7364 0.2853033744415e-10, 0.3948481024894e+01, 0.2118763888447e+01 };
7365
7366 /* SSB-to-Sun, T^1, Y */
7367 static final double s1y[] = {
7368 0.8989047573576e-08, 0.5840593672122e+01, 0.4265981595566e+00,
7369 0.7815938401048e-08, 0.1129664707133e+01, 0.2061856251104e+00,
7370 0.7550926713280e-08, 0.6196589104845e+00, 0.2204125344462e+00,
7371 0.6056556925895e-08, 0.1677494667846e+01, 0.1059381944224e+01,
7372 0.5734142698204e-08, 0.4000920852962e+01, 0.5225775174439e+00,
7373 0.5614341822459e-08, 0.3486722577328e+01, 0.5368044267797e+00,
7374 0.1028678147656e-08, 0.1877141024787e+01, 0.7113454667900e-02,
7375 0.7270792075266e-09, 0.5077167301739e+01, 0.6398972393349e+00,
7376 0.8734141726040e-09, 0.9069550282609e-01, 0.4194847048887e+00,
7377 0.5377371402113e-09, 0.6039381844671e+01, 0.4337116142245e+00,
7378
7379 0.4729719431571e-09, 0.2153086311760e+01, 0.2132990797783e+00,
7380 0.4458052820973e-09, 0.5059830025565e+01, 0.5296909721118e+00,
7381 0.4406855467908e-09, 0.2027971692630e+01, 0.1589072916335e+01,
7382 0.3101659310977e-09, 0.3317677981860e+01, 0.1052268489556e+01,
7383 0.3016749232545e-09, 0.3913703482532e+01, 0.1066495398892e+01,
7384 0.3198541352656e-09, 0.1275513098525e+01, 0.1495633313810e+00,
7385 0.2142065389871e-09, 0.5301351614597e+01, 0.3163918923335e+00,
7386 0.1902615247592e-09, 0.4894943352736e+00, 0.2275259891141e+00,
7387 0.1613410990871e-09, 0.2449891130437e+01, 0.1102062672231e+00,
7388 0.1576992165097e-09, 0.4211421447633e+01, 0.7626583626240e-01,
7389
7390 0.1241637259894e-09, 0.4140803368133e+01, 0.5154640627760e+00,
7391 0.1313974830355e-09, 0.3591920305503e+01, 0.3664874755930e-01,
7392 0.1181697118258e-09, 0.1506314382788e+01, 0.6327837846670e+00,
7393 0.1238239742779e-09, 0.7461405378404e+00, 0.3961708870310e-01,
7394 0.1010107068241e-09, 0.6271010795475e+00, 0.7329749511860e-01,
7395 0.9226316616509e-10, 0.1259158839583e+01, 0.1990721704425e+00,
7396 0.8664946419555e-10, 0.3353244696934e+01, 0.5439178814476e+00,
7397 0.7757230468978e-10, 0.1447677295196e+01, 0.9491756770005e+00,
7398 0.7693168628139e-10, 0.1120509896721e+01, 0.1030928125552e+00,
7399 0.5487897454612e-10, 0.4439380426795e+01, 0.8531963191132e+00,
7400
7401 0.5196118677218e-10, 0.3788856619137e+00, 0.2093666171530e+00,
7402 0.5110853339935e-10, 0.1386879372016e+01, 0.2172315424036e+00,
7403 0.5027804534813e-10, 0.1647881805466e+00, 0.2164800718209e+00,
7404 0.4922485922674e-10, 0.1594315079862e+01, 0.2101180877357e+00,
7405 0.6155599524400e-10, 0.0000000000000e+00, 0.0000000000000e+00,
7406 0.4447147832161e-10, 0.5480720918976e+01, 0.3235053470014e+00,
7407 0.4144691276422e-10, 0.1931371033660e+01, 0.6373574839730e-01,
7408 0.4099950625452e-10, 0.5229611294335e+01, 0.6470106940028e+00,
7409 0.5060541682953e-10, 0.1731112486298e+01, 0.1422690933580e-01,
7410 0.4293615946300e-10, 0.2714571038925e+01, 0.7358765972222e+00,
7411
7412 0.3545659845763e-10, 0.4451041444634e+01, 0.5265099800692e+00,
7413 0.3479112041196e-10, 0.3029385448081e+01, 0.5328719641544e+00,
7414 0.3438516493570e-10, 0.2778507143731e+01, 0.8582758298370e-01,
7415 0.3297341285033e-10, 0.7898709807584e+00, 0.1104591729320e-01,
7416 0.2972585818015e-10, 0.3218785316973e+01, 0.5257585094865e+00,
7417 0.2931707295017e-10, 0.4260731012098e+01, 0.5336234347371e+00,
7418 0.2897198149403e-10, 0.1120753978101e+01, 0.1173197218910e+00,
7419 0.2832293240878e-10, 0.4597682717827e+00, 0.2022531624851e+00,
7420 0.2864348326612e-10, 0.2169939928448e+01, 0.9597935788730e-01,
7421 0.2852714675471e-10, 0.2377659870578e+01, 0.2118763888447e+01 };
7422
7423 /* SSB-to-Sun, T^1, Z */
7424 static final double s1z[] = {
7425 0.5444220475678e-08, 0.1803825509310e+01, 0.2132990797783e+00,
7426 0.3883412695596e-08, 0.4668616389392e+01, 0.5296909721118e+00,
7427 0.1334341434551e-08, 0.0000000000000e+00, 0.0000000000000e+00,
7428 0.3730001266883e-09, 0.5401405918943e+01, 0.2061856251104e+00,
7429 0.2894929197956e-09, 0.4932415609852e+01, 0.2204125344462e+00,
7430 0.2857950357701e-09, 0.3154625362131e+01, 0.7478166569050e-01,
7431 0.2499226432292e-09, 0.3657486128988e+01, 0.4265981595566e+00,
7432 0.1937705443593e-09, 0.5740434679002e+01, 0.1059381944224e+01,
7433 0.1374894396320e-09, 0.1712857366891e+01, 0.5368044267797e+00,
7434 0.1217248678408e-09, 0.2312090870932e+01, 0.5225775174439e+00,
7435
7436 0.7961052740870e-10, 0.5283368554163e+01, 0.3813291813120e-01,
7437 0.4979225949689e-10, 0.4298290471860e+01, 0.4194847048887e+00,
7438 0.4388552286597e-10, 0.6145515047406e+01, 0.7113454667900e-02,
7439 0.2586835212560e-10, 0.3019448001809e+01, 0.6398972393349e+00 };
7440
7441 /* SSB-to-Sun, T^2, X */
7442 static final double s2x[] = {
7443 0.1603551636587e-11, 0.4404109410481e+01, 0.2061856251104e+00,
7444 0.1556935889384e-11, 0.4818040873603e+00, 0.2204125344462e+00,
7445 0.1182594414915e-11, 0.9935762734472e+00, 0.5225775174439e+00,
7446 0.1158794583180e-11, 0.3353180966450e+01, 0.5368044267797e+00,
7447 0.9597358943932e-12, 0.5567045358298e+01, 0.2132990797783e+00,
7448 0.6511516579605e-12, 0.5630872420788e+01, 0.4265981595566e+00,
7449 0.7419792747688e-12, 0.2156188581957e+01, 0.5296909721118e+00,
7450 0.3951972655848e-12, 0.1981022541805e+01, 0.1059381944224e+01,
7451 0.4478223877045e-12, 0.0000000000000e+00, 0.0000000000000e+00 };
7452
7453 /* SSB-to-Sun, T^2, Y */
7454 static final double s2y[] = {
7455 0.1609114495091e-11, 0.2831096993481e+01, 0.2061856251104e+00,
7456 0.1560330784946e-11, 0.5193058213906e+01, 0.2204125344462e+00,
7457 0.1183535479202e-11, 0.5707003443890e+01, 0.5225775174439e+00,
7458 0.1158183066182e-11, 0.1782400404928e+01, 0.5368044267797e+00,
7459 0.1032868027407e-11, 0.4036925452011e+01, 0.2132990797783e+00,
7460 0.6540142847741e-12, 0.4058241056717e+01, 0.4265981595566e+00,
7461 0.7305236491596e-12, 0.6175401942957e+00, 0.5296909721118e+00,
7462 -0.5580725052968e-12, 0.0000000000000e+00, 0.0000000000000e+00,
7463 0.3946122651015e-12, 0.4108265279171e+00, 0.1059381944224e+01 };
7464
7465 /* SSB-to-Sun, T^2, Z */
7466 static final double s2z[] = {
7467 0.3749920358054e-12, 0.3230285558668e+01, 0.2132990797783e+00,
7468 0.2735037220939e-12, 0.6154322683046e+01, 0.5296909721118e+00 };
7469 }
7470
7471 /**
7472 * Earth position and velocity, heliocentric and barycentric, with
7473 * respect to the Barycentric Celestial Reference System.
7474 *
7475 *<p>This function is derived from the International Astronomical Union's
7476 * SOFA (Standards Of Fundamental Astronomy) software collection.
7477 *
7478 *<p>Status: support function.
7479 *
7480 *<!-- Given: -->
7481 * @param date1 double TDB date (Note 1)
7482 * @param date2 double TDB date (Note 1)
7483 *
7484 *<!-- Returned: -->
7485 * @param pvh double[2][3] <u>returned</u> heliocentric Earth position/velocity (au, au/d)
7486 * @param pvb double[2][3] <u>returned</u> barycentric Earth position/velocity (au, au/d)
7487 *
7488 * <!-- Returned (function value): -->
7489 * @return int status: 0 = OK
7490 * +1 = warning: date outside
7491 * the range 1900-2100 AD
7492 *
7493 * <p>Notes:
7494 * <ol>
7495 *
7496 * <li> The TDB date date1+date2 is a Julian Date, apportioned in any
7497 * convenient way between the two arguments. For example,
7498 * JD(TDB)=2450123.7 could be expressed in any of these ways, among
7499 * others:
7500 *<pre>
7501 * date1 date2
7502 *
7503 * 2450123.7 0.0 (JD method)
7504 * 2451545.0 -1421.3 (J2000 method)
7505 * 2400000.5 50123.2 (MJD method)
7506 * 2450123.5 0.2 (date & time method)
7507 *</pre>
7508 * The JD method is the most natural and convenient to use in cases
7509 * where the loss of several decimal digits of resolution is
7510 * acceptable. The J2000 method is best matched to the way the
7511 * argument is handled internally and will deliver the optimum
7512 * resolution. The MJD method and the date & time methods are both
7513 * good compromises between resolution and convenience. However,
7514 * the accuracy of the result is more likely to be limited by the
7515 * algorithm itself than the way the date has been expressed.
7516 *
7517 * n.b. TT can be used instead of TDB in most applications.
7518 *
7519 * <li> On return, the arrays pvh and pvb contain the following:
7520 *
7521 * pvh[0][0] x }
7522 * pvh[0][1] y } heliocentric position, au
7523 * pvh[0][2] z }
7524 *
7525 * pvh[1][0] xdot }
7526 * pvh[1][1] ydot } heliocentric velocity, au/d
7527 * pvh[1][2] zdot }
7528 *
7529 * pvb[0][0] x }
7530 * pvb[0][1] y } barycentric position, au
7531 * pvb[0][2] z }
7532 *
7533 * pvb[1][0] xdot }
7534 * pvb[1][1] ydot } barycentric velocity, au/d
7535 * pvb[1][2] zdot }
7536 *
7537 * The vectors are with respect to the Barycentric Celestial
7538 * Reference System. The time unit is one day in TDB.
7539 *
7540 * <li> The function is a SIMPLIFIED SOLUTION from the planetary theory
7541 * VSOP2000 (X. Moisson, P. Bretagnon, 2001, Celes. Mechanics &
7542 * Dyn. Astron., 80, 3/4, 205-213) and is an adaptation of original
7543 * Fortran code supplied by P. Bretagnon (private comm., 2000).
7544 *
7545 * <li> Comparisons over the time span 1900-2100 with this simplified
7546 * solution and the JPL DE405 ephemeris give the following results:
7547 *
7548 * RMS max
7549 * Heliocentric:
7550 * position error 3.7 11.2 km
7551 * velocity error 1.4 5.0 mm/s
7552 *
7553 * Barycentric:
7554 * position error 4.6 13.4 km
7555 * velocity error 1.4 4.9 mm/s
7556 *
7557 * Comparisons with the JPL DE406 ephemeris show that by 1800 and
7558 * 2200 the position errors are approximately double their 1900-2100
7559 * size. By 1500 and 2500 the deterioration is a factor of 10 and
7560 * by 1000 and 3000 a factor of 60. The velocity accuracy falls off
7561 * at about half that rate.
7562 *
7563 * <li> It is permissible to use the same array for pvh and pvb, which
7564 * will receive the barycentric values.
7565 *</ol>
7566 *@version 2008 November 18
7567 *
7568 * @since Release 20101201
7569 *
7570 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
7571 */
7572 public static int jauEpv00(final double date1, final double date2,
7573 double pvh[][], double pvb[][])
7574 {
7575 /*
7576 * Matrix elements for orienting the analytical model to DE405.
7577 *
7578 * The corresponding Euler angles are:
7579 *
7580 * d ' "
7581 * 1st rotation - 23 26 21.4091 about the x-axis (obliquity)
7582 * 2nd rotation + 0.0475 about the z-axis (RA offset)
7583 *
7584 * These were obtained empirically, by comparisons with DE405 over
7585 * 1900-2100.
7586 */
7587 final double am12 = 0.000000211284,
7588 am13 = -0.000000091603,
7589 am21 = -0.000000230286,
7590 am22 = 0.917482137087,
7591 am23 = -0.397776982902,
7592 am32 = 0.397776982902,
7593 am33 = 0.917482137087;
7594
7595
7596
7597
7598 /* Pointers to coefficient arrays, in x,y,z sets */
7599 final double ce0[][] = { Ephemeris.e0x, Ephemeris.e0y, Ephemeris.e0z },
7600 ce1[][] = { Ephemeris.e1x, Ephemeris.e1y, Ephemeris.e1z },
7601 ce2[][] = { Ephemeris.e2x, Ephemeris.e2y, Ephemeris.e2z },
7602 cs0[][] = { Ephemeris.s0x, Ephemeris.s0y, Ephemeris.s0z },
7603 cs1[][] = { Ephemeris.s1x, Ephemeris.s1y, Ephemeris.s1z },
7604 cs2[][] = { Ephemeris.s2x, Ephemeris.s2y, Ephemeris.s2z };
7605 /* Numbers of terms for each component of the model, in x,y,z sets */
7606 final int ne0[] = {Ephemeris.e0x.length/3,
7607 Ephemeris.e0y.length/3,
7608 Ephemeris.e0z.length/3 },
7609 ne1[] = {Ephemeris.e1x.length/3,
7610 Ephemeris.e1y.length/3,
7611 Ephemeris.e1z.length/3 },
7612 ne2[] = {Ephemeris.e2x.length/3,
7613 Ephemeris.e2y.length/3,
7614 Ephemeris.e2z.length/3 },
7615 ns0[] = {Ephemeris.s0x.length/3,
7616 Ephemeris.s0y.length/3,
7617 Ephemeris.s0z.length/3 },
7618 ns1[] = {Ephemeris.s1x.length/3,
7619 Ephemeris.s1y.length/3,
7620 Ephemeris.s1z.length/3 },
7621 ns2[] = {Ephemeris.s2x.length/3,
7622 Ephemeris.s2y.length/3,
7623 Ephemeris.s2z.length/3 };
7624 int nterms;
7625
7626 /* Miscellaneous */
7627 int jstat, i, j;
7628 double t, t2, xyz, xyzd, a, b, c, ct, p, cp,
7629 ph[] = new double[3], vh[] = new double[3], pb[] = new double[3], vb[] = new double[3], x, y, z;
7630
7631 /*--------------------------------------------------------------------*/
7632
7633 /* Time since reference epoch, Julian years. */
7634 t = ((date1 - DJ00) + date2) / DJY;
7635 t2 = t*t;
7636
7637 /* Set status. */
7638 jstat = abs(t) <= 100.0 ? 0 : 1;
7639
7640 /* X then Y then Z. */
7641 for (i = 0; i < 3; i++) {
7642
7643 /* Initialize position and velocity component. */
7644 xyz = 0.0;
7645 xyzd = 0.0;
7646
7647 /* ------------------------------------------------ */
7648 /* Obtain component of Sun to Earth ecliptic vector */
7649 /* ------------------------------------------------ */
7650
7651 /* Sun to Earth, T^0 terms. */
7652 nterms = ne0[i];
7653 int idx;
7654 for (j = 0, idx=0; j < nterms; j++) {
7655 a = ce0[i][idx++];
7656 b = ce0[i][idx++];
7657 c = ce0[i][idx++];
7658 p = b + c*t;
7659 xyz += a*cos(p);
7660 xyzd -= a*c*sin(p);
7661 }
7662
7663 /* Sun to Earth, T^1 terms. */
7664 nterms = ne1[i];
7665 for (j = 0, idx= 0; j < nterms; j++) {
7666 a = ce1[i][idx++];
7667 b = ce1[i][idx++];
7668 c = ce1[i][idx++];
7669 ct = c*t;
7670 p = b + ct;
7671 cp = cos(p);
7672 xyz += a*t*cp;
7673 xyzd += a*( cp - ct*sin(p) );
7674 }
7675
7676 /* Sun to Earth, T^2 terms. */
7677 nterms = ne2[i];
7678 for (j = 0, idx = 0; j < nterms; j++) {
7679 a = ce2[i][idx++];
7680 b = ce2[i][idx++];
7681 c = ce2[i][idx++];
7682 ct = c*t;
7683 p = b + ct;
7684 cp = cos(p);
7685 xyz += a*t2*cp;
7686 xyzd += a*t*( 2.0*cp - ct*sin(p) );
7687 }
7688
7689 /* Heliocentric Earth position and velocity component. */
7690 ph[i] = xyz;
7691 vh[i] = xyzd / DJY;
7692
7693 /* ------------------------------------------------ */
7694 /* Obtain component of SSB to Earth ecliptic vector */
7695 /* ------------------------------------------------ */
7696
7697 /* SSB to Sun, T^0 terms. */
7698 nterms = ns0[i];
7699 for (j = 0, idx = 0; j < nterms; j++) {
7700 a = cs0[i][idx++];
7701 b = cs0[i][idx++];
7702 c = cs0[i][idx++];
7703 p = b + c*t;
7704 xyz += a*cos(p);
7705 xyzd -= a*c*sin(p);
7706 }
7707
7708 /* SSB to Sun, T^1 terms. */
7709 nterms = ns1[i];
7710 for (j = 0, idx = 0; j < nterms; j++) {
7711 a = cs1[i][idx++];
7712 b = cs1[i][idx++];
7713 c = cs1[i][idx++];
7714 ct = c*t;
7715 p = b + ct;
7716 cp = cos(p);
7717 xyz += a*t*cp;
7718 xyzd += a*(cp - ct*sin(p));
7719 }
7720
7721 /* SSB to Sun, T^2 terms. */
7722 nterms = ns2[i];
7723 for (j = 0, idx = 0; j < nterms; j++) {
7724 a = cs2[i][idx++];
7725 b = cs2[i][idx++];
7726 c = cs2[i][idx++];
7727 ct = c*t;
7728 p = b + ct;
7729 cp = cos(p);
7730 xyz += a*t2*cp;
7731 xyzd += a*t*(2.0*cp - ct*sin(p));
7732 }
7733
7734 /* Barycentric Earth position and velocity component. */
7735 pb[i] = xyz;
7736 vb[i] = xyzd / DJY;
7737
7738 /* Next Cartesian component. */
7739 }
7740
7741 /* Rotate from ecliptic to BCRS coordinates. */
7742
7743 x = ph[0];
7744 y = ph[1];
7745 z = ph[2];
7746 pvh[0][0] = x + am12*y + am13*z;
7747 pvh[0][1] = am21*x + am22*y + am23*z;
7748 pvh[0][2] = am32*y + am33*z;
7749
7750 x = vh[0];
7751 y = vh[1];
7752 z = vh[2];
7753 pvh[1][0] = x + am12*y + am13*z;
7754 pvh[1][1] = am21*x + am22*y + am23*z;
7755 pvh[1][2] = am32*y + am33*z;
7756
7757 x = pb[0];
7758 y = pb[1];
7759 z = pb[2];
7760 pvb[0][0] = x + am12*y + am13*z;
7761 pvb[0][1] = am21*x + am22*y + am23*z;
7762 pvb[0][2] = am32*y + am33*z;
7763
7764 x = vb[0];
7765 y = vb[1];
7766 z = vb[2];
7767 pvb[1][0] = x + am12*y + am13*z;
7768 pvb[1][1] = am21*x + am22*y + am23*z;
7769 pvb[1][2] = am32*y + am33*z;
7770
7771 /* Return the status. */
7772 return jstat;
7773
7774 }
7775
7776
7777 /**
7778 * Equation of the equinoxes, IAU 1994 model.
7779 *
7780 *<p>This function is derived from the International Astronomical Union's
7781 * SOFA (Standards Of Fundamental Astronomy) software collection.
7782 *
7783 *<p>Status: canonical model.
7784 *
7785 *<!-- Given: -->
7786 * @param date1 double TDB date (Note 1)
7787 * @param date2 double TDB date (Note 1)
7788 *
7789 * <!-- Returned (function value): -->
7790 * @return double equation of the equinoxes (Note 2)
7791 *
7792 * <p>Notes:
7793 * <ol>
7794 *
7795 * <li> The date date1+date2 is a Julian Date, apportioned in any
7796 * convenient way between the two arguments. For example,
7797 * JD(TT)=2450123.7 could be expressed in any of these ways,
7798 * among others:
7799 *<pre>
7800 * date1 date2
7801 *
7802 * 2450123.7 0.0 (JD method)
7803 * 2451545.0 -1421.3 (J2000 method)
7804 * 2400000.5 50123.2 (MJD method)
7805 * 2450123.5 0.2 (date & time method)
7806 *</pre>
7807 * The JD method is the most natural and convenient to use in
7808 * cases where the loss of several decimal digits of resolution
7809 * is acceptable. The J2000 method is best matched to the way
7810 * the argument is handled internally and will deliver the
7811 * optimum resolution. The MJD method and the date & time methods
7812 * are both good compromises between resolution and convenience.
7813 *
7814 * <li> The result, which is in radians, operates in the following sense:
7815 *
7816 * Greenwich apparent ST = GMST + equation of the equinoxes
7817 *</ol>
7818 *<p>Called:<ul>
7819 * <li>{@link #jauNut80} nutation, IAU 1980
7820 * <li>{@link #jauObl80} mean obliquity, IAU 1980
7821 * </ul>
7822 *<p>References:
7823 *
7824 * <p>IAU Resolution C7, Recommendation 3 (1994).
7825 *
7826 * <p>Capitaine, N. & Gontier, A.-M., 1993, Astron. Astrophys., 275,
7827 * 645-650.
7828 *
7829 *@version 2008 May 24
7830 *
7831 * @since Release 20101201
7832 *
7833 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
7834 */
7835 public static double jauEqeq94(double date1, double date2)
7836 {
7837 double t, om, eps0, ee;
7838
7839
7840 /* Interval between fundamental epoch J2000.0 and given date (JC). */
7841 t = ((date1 - DJ00) + date2) / DJC;
7842
7843 /* Longitude of the mean ascending node of the lunar orbit on the */
7844 /* ecliptic, measured from the mean equinox of date. */
7845 om = jauAnpm((450160.280 + (-482890.539
7846 + (7.455 + 0.008 * t) * t) * t) * DAS2R
7847 + fmod(-5.0 * t, 1.0) * D2PI);
7848
7849 /* Nutation components and mean obliquity. */
7850 NutationTerms nt = jauNut80(date1, date2);
7851 eps0 = jauObl80(date1, date2);
7852
7853 /* Equation of the equinoxes. */
7854 ee = nt.dpsi*cos(eps0) + DAS2R*(0.00264*sin(om) + 0.000063*sin(om+om));
7855
7856 return ee;
7857
7858 }
7859
7860
7861 /**
7862 * Earth rotation angle (IAU 2000 model).
7863 *
7864 *<p>This function is derived from the International Astronomical Union's
7865 * SOFA (Standards Of Fundamental Astronomy) software collection.
7866 *
7867 *<p>Status: canonical model.
7868 *
7869 *<!-- Given: -->
7870 * @param dj1 double UT1 as a 2-part Julian Date (see note)
7871 * @param dj2 double UT1 as a 2-part Julian Date (see note)
7872 *
7873 * <!-- Returned (function value): -->
7874 * @return double Earth rotation angle (radians), range 0-2pi
7875 *
7876 * <p>Notes:
7877 * <ol>
7878 *
7879 * <li> The UT1 date dj1+dj2 is a Julian Date, apportioned in any
7880 * convenient way between the arguments dj1 and dj2. For example,
7881 * JD(UT1)=2450123.7 could be expressed in any of these ways,
7882 * among others:
7883 *<pre>
7884 * dj1 dj2
7885 *
7886 * 2450123.7 0.0 (JD method)
7887 * 2451545.0 -1421.3 (J2000 method)
7888 * 2400000.5 50123.2 (MJD method)
7889 * 2450123.5 0.2 (date & time method)
7890 *</pre>
7891 * The JD method is the most natural and convenient to use in
7892 * cases where the loss of several decimal digits of resolution
7893 * is acceptable. The J2000 and MJD methods are good compromises
7894 * between resolution and convenience. The date & time method is
7895 * best matched to the algorithm used: maximum precision is
7896 * delivered when the dj1 argument is for 0hrs UT1 on the day in
7897 * question and the dj2 argument lies in the range 0 to 1, or vice
7898 * versa.
7899 *
7900 * <li> The algorithm is adapted from Expression 22 of Capitaine et al.
7901 * 2000. The time argument has been expressed in days directly,
7902 * and, to retain precision, integer contributions have been
7903 * eliminated. The same formulation is given in IERS Conventions
7904 * (2003), Chap. 5, Eq. 14.
7905 *</ol>
7906 *<p>Called:<ul>
7907 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
7908 * </ul>
7909 *<p>References:
7910 *
7911 * <p>Capitaine N., Guinot B. and McCarthy D.D, 2000, Astron.
7912 * Astrophys., 355, 398-405.
7913 *
7914 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
7915 * IERS Technical Note No. 32, BKG (2004)
7916 *
7917 *@version 2008 May 24
7918 *
7919 * @since Release 20101201
7920 *
7921 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
7922 */
7923 public static double jauEra00(double dj1, double dj2)
7924 {
7925 double d1, d2, t, f, theta;
7926
7927
7928 /* Days since fundamental epoch. */
7929 if (dj1 < dj2) {
7930 d1 = dj1;
7931 d2 = dj2;
7932 } else {
7933 d1 = dj2;
7934 d2 = dj1;
7935 }
7936 t = d1 + (d2- DJ00);
7937
7938 /* Fractional part of T (days). */
7939 f = fmod(d1, 1.0) + fmod(d2, 1.0);
7940
7941 /* Earth rotation angle at this UT1. */
7942 theta = jauAnp(D2PI * (f + 0.7790572732640
7943 + 0.00273781191135448 * t));
7944
7945 return theta;
7946
7947 }
7948
7949
7950 /**
7951 * Fundamental argument, IERS Conventions (2003):
7952 * mean elongation of the Moon from the Sun.
7953 *
7954 *<p>This function is derived from the International Astronomical Union's
7955 * SOFA (Standards Of Fundamental Astronomy) software collection.
7956 *
7957 *<p>Status: canonical model.
7958 *
7959 *<!-- Given: -->
7960 * @param t double TDB, Julian centuries since J2000.0 (Note 1)
7961 *
7962 * <!-- Returned (function value): -->
7963 * @return double D, radians (Note 2)
7964 *
7965 * <p>Notes:
7966 * <ol>
7967 *
7968 * <li> Though t is strictly TDB, it is usually more convenient to use
7969 * TT, which makes no significant difference.
7970 *
7971 * <li> The expression used is as adopted in IERS Conventions (2003) and
7972 * is from Simon et al. (1994).
7973 *</ol>
7974 *<p>References:
7975 *
7976 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
7977 * IERS Technical Note No. 32, BKG (2004)
7978 *
7979 * <p>Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
7980 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
7981 *
7982 *@version 2009 December 16
7983 *
7984 * @since Release 20101201
7985 *
7986 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
7987 */
7988 public static double jauFad03(double t)
7989 {
7990 double a;
7991
7992
7993 /* Mean elongation of the Moon from the Sun (IERS Conventions 2003). */
7994 a = fmod( 1072260.703692 +
7995 t * ( 1602961601.2090 +
7996 t * ( - 6.3706 +
7997 t * ( 0.006593 +
7998 t * ( - 0.00003169 ) ) ) ), TURNAS ) * DAS2R;
7999
8000 return a;
8001
8002 }
8003
8004
8005 /**
8006 * Fundamental argument, IERS Conventions (2003):
8007 * mean longitude of Earth.
8008 *
8009 *<p>This function is derived from the International Astronomical Union's
8010 * SOFA (Standards Of Fundamental Astronomy) software collection.
8011 *
8012 *<p>Status: canonical model.
8013 *
8014 *<!-- Given: -->
8015 * @param t double TDB, Julian centuries since J2000.0 (Note 1)
8016 *
8017 * <!-- Returned (function value): -->
8018 * @return double mean longitude of Earth, radians (Note 2)
8019 *
8020 * <p>Notes:
8021 * <ol>
8022 *
8023 * <li> Though t is strictly TDB, it is usually more convenient to use
8024 * TT, which makes no significant difference.
8025 *
8026 * <li> The expression used is as adopted in IERS Conventions (2003) and
8027 * comes from Souchay et al. (1999) after Simon et al. (1994).
8028 *</ol>
8029 *<p>References:
8030 *
8031 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8032 * IERS Technical Note No. 32, BKG (2004)
8033 *
8034 * <p>Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8035 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8036 *
8037 * <p>Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
8038 * Astron.Astrophys.Supp.Ser. 135, 111
8039 *
8040 *@version 2009 December 16
8041 *
8042 * @since Release 20101201
8043 *
8044 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8045 */
8046 public static double jauFae03(double t)
8047 {
8048 double a;
8049
8050
8051 /* Mean longitude of Earth (IERS Conventions 2003). */
8052 a = fmod(1.753470314 + 628.3075849991 * t, D2PI);
8053
8054 return a;
8055
8056 }
8057
8058
8059 /**
8060 * Fundamental argument, IERS Conventions (2003):
8061 * mean longitude of the Moon minus mean longitude of the ascending
8062 * node.
8063 *
8064 *<p>This function is derived from the International Astronomical Union's
8065 * SOFA (Standards Of Fundamental Astronomy) software collection.
8066 *
8067 *<p>Status: canonical model.
8068 *
8069 *<!-- Given: -->
8070 * @param t double TDB, Julian centuries since J2000.0 (Note 1)
8071 *
8072 * <!-- Returned (function value): -->
8073 * @return double F, radians (Note 2)
8074 *
8075 * <p>Notes:
8076 * <ol>
8077 *
8078 * <li> Though t is strictly TDB, it is usually more convenient to use
8079 * TT, which makes no significant difference.
8080 *
8081 * <li> The expression used is as adopted in IERS Conventions (2003) and
8082 * is from Simon et al. (1994).
8083 *</ol>
8084 *<p>References:
8085 *
8086 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8087 * IERS Technical Note No. 32, BKG (2004)
8088 *
8089 * Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8090 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8091 *
8092 *@version 2009 December 16
8093 *
8094 * @since Release 20101201
8095 *
8096 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8097 */
8098 public static double jauFaf03(double t)
8099 {
8100 double a;
8101
8102
8103 /* Mean longitude of the Moon minus that of the ascending node */
8104 /* (IERS Conventions 2003). */
8105 a = fmod( 335779.526232 +
8106 t * ( 1739527262.8478 +
8107 t * ( - 12.7512 +
8108 t * ( - 0.001037 +
8109 t * ( 0.00000417 ) ) ) ), TURNAS ) * DAS2R;
8110
8111 return a;
8112
8113
8114 }
8115
8116
8117 /**
8118 * Fundamental argument, IERS Conventions (2003):
8119 * mean longitude of Jupiter.
8120 *
8121 *<p>This function is derived from the International Astronomical Union's
8122 * SOFA (Standards Of Fundamental Astronomy) software collection.
8123 *
8124 *<p>Status: canonical model.
8125 *
8126 *<!-- Given: -->
8127 * @param t double TDB, Julian centuries since J2000.0 (Note 1)
8128 *
8129 * <!-- Returned (function value): -->
8130 * @return double mean longitude of Jupiter, radians (Note 2)
8131 *
8132 * <p>Notes:
8133 * <ol>
8134 *
8135 * <li> Though t is strictly TDB, it is usually more convenient to use
8136 * TT, which makes no significant difference.
8137 *
8138 * <li> The expression used is as adopted in IERS Conventions (2003) and
8139 * comes from Souchay et al. (1999) after Simon et al. (1994).
8140 *</ol>
8141 *<p>References:
8142 *
8143 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8144 * IERS Technical Note No. 32, BKG (2004)
8145 *
8146 * <p>Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8147 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8148 *
8149 * <p>Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
8150 * Astron.Astrophys.Supp.Ser. 135, 111
8151 *
8152 *@version 2009 December 16
8153 *
8154 * @since Release 20101201
8155 *
8156 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8157 */
8158 public static double jauFaju03(double t)
8159 {
8160 double a;
8161
8162
8163 /* Mean longitude of Jupiter (IERS Conventions 2003). */
8164 a = fmod(0.599546497 + 52.9690962641 * t, D2PI);
8165
8166 return a;
8167
8168 }
8169
8170
8171 /**
8172 * Fundamental argument, IERS Conventions (2003):
8173 * mean anomaly of the Moon.
8174 *
8175 *<p>This function is derived from the International Astronomical Union's
8176 * SOFA (Standards Of Fundamental Astronomy) software collection.
8177 *
8178 *<p>Status: canonical model.
8179 *
8180 *<!-- Given: -->
8181 * @param t double TDB, Julian centuries since J2000.0 (Note 1)
8182 *
8183 * <!-- Returned (function value): -->
8184 * @return double l, radians (Note 2)
8185 *
8186 * <p>Notes:
8187 * <ol>
8188 *
8189 * <li> Though t is strictly TDB, it is usually more convenient to use
8190 * TT, which makes no significant difference.
8191 *
8192 * <li> The expression used is as adopted in IERS Conventions (2003) and
8193 * is from Simon et al. (1994).
8194 *</ol>
8195 *<p>References:
8196 *
8197 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8198 * IERS Technical Note No. 32, BKG (2004)
8199 *
8200 * Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8201 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8202 *
8203 *@version 2009 December 16
8204 *
8205 * @since Release 20101201
8206 *
8207 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8208 */
8209 public static double jauFal03(double t)
8210 {
8211 double a;
8212
8213
8214 /* Mean anomaly of the Moon (IERS Conventions 2003). */
8215 a = fmod( 485868.249036 +
8216 t * ( 1717915923.2178 +
8217 t * ( 31.8792 +
8218 t * ( 0.051635 +
8219 t * ( - 0.00024470 ) ) ) ), TURNAS ) * DAS2R;
8220
8221 return a;
8222
8223 }
8224
8225
8226 /**
8227 * Fundamental argument, IERS Conventions (2003):
8228 * mean anomaly of the Sun.
8229 *
8230 *<p>This function is derived from the International Astronomical Union's
8231 * SOFA (Standards Of Fundamental Astronomy) software collection.
8232 *
8233 *<p>Status: canonical model.
8234 *
8235 *<!-- Given: -->
8236 * @param t double TDB, Julian centuries since J2000.0 (Note 1)
8237 *
8238 * <!-- Returned (function value): -->
8239 * @return double l', radians (Note 2)
8240 *
8241 * <p>Notes:
8242 * <ol>
8243 *
8244 * <li> Though t is strictly TDB, it is usually more convenient to use
8245 * TT, which makes no significant difference.
8246 *
8247 * <li> The expression used is as adopted in IERS Conventions (2003) and
8248 * is from Simon et al. (1994).
8249 *</ol>
8250 *<p>References:
8251 *
8252 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8253 * IERS Technical Note No. 32, BKG (2004)
8254 *
8255 * Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8256 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8257 *
8258 *@version 2009 December 16
8259 *
8260 * @since Release 20101201
8261 *
8262 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8263 */
8264 public static double jauFalp03(double t)
8265 {
8266 double a;
8267
8268
8269 /* Mean anomaly of the Sun (IERS Conventions 2003). */
8270 a = fmod( 1287104.793048 +
8271 t * ( 129596581.0481 +
8272 t * ( - 0.5532 +
8273 t * ( 0.000136 +
8274 t * ( - 0.00001149 ) ) ) ), TURNAS ) * DAS2R;
8275
8276 return a;
8277
8278 }
8279
8280
8281 /**
8282 * Fundamental argument, IERS Conventions (2003):
8283 * mean longitude of Mars.
8284 *
8285 *<p>This function is derived from the International Astronomical Union's
8286 * SOFA (Standards Of Fundamental Astronomy) software collection.
8287 *
8288 *<p>Status: canonical model.
8289 *
8290 *<!-- Given: -->
8291 * @param t double TDB, Julian centuries since J2000.0 (Note 1)
8292 *
8293 * <!-- Returned (function value): -->
8294 * @return double mean longitude of Mars, radians (Note 2)
8295 *
8296 * <p>Notes:
8297 * <ol>
8298 *
8299 * <li> Though t is strictly TDB, it is usually more convenient to use
8300 * TT, which makes no significant difference.
8301 *
8302 * <li> The expression used is as adopted in IERS Conventions (2003) and
8303 * comes from Souchay et al. (1999) after Simon et al. (1994).
8304 *</ol>
8305 *<p>References:
8306 *
8307 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8308 * IERS Technical Note No. 32, BKG (2004)
8309 *
8310 * Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8311 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8312 *
8313 * Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
8314 * Astron.Astrophys.Supp.Ser. 135, 111
8315 *
8316 *@version 2009 December 16
8317 *
8318 * @since Release 20101201
8319 *
8320 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8321 */
8322 public static double jauFama03(double t)
8323 {
8324 double a;
8325
8326
8327 /* Mean longitude of Mars (IERS Conventions 2003). */
8328 a = fmod(6.203480913 + 334.0612426700 * t, D2PI);
8329
8330 return a;
8331
8332 }
8333
8334
8335 /**
8336 * Fundamental argument, IERS Conventions (2003):
8337 * mean longitude of Mercury.
8338 *
8339 *<p>This function is derived from the International Astronomical Union's
8340 * SOFA (Standards Of Fundamental Astronomy) software collection.
8341 *
8342 *<p>Status: canonical model.
8343 *
8344 *<!-- Given: -->
8345 * @param t double TDB, Julian centuries since J2000.0 (Note 1)
8346 *
8347 * <!-- Returned (function value): -->
8348 * @return double mean longitude of Mercury, radians (Note 2)
8349 *
8350 * <p>Notes:
8351 * <ol>
8352 *
8353 * <li> Though t is strictly TDB, it is usually more convenient to use
8354 * TT, which makes no significant difference.
8355 *
8356 * <li> The expression used is as adopted in IERS Conventions (2003) and
8357 * comes from Souchay et al. (1999) after Simon et al. (1994).
8358 *</ol>
8359 *<p>References:
8360 *
8361 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8362 * IERS Technical Note No. 32, BKG (2004)
8363 *
8364 * Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8365 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8366 *
8367 * Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
8368 * Astron.Astrophys.Supp.Ser. 135, 111
8369 *
8370 *@version 2009 December 16
8371 *
8372 * @since Release 20101201
8373 *
8374 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8375 */
8376 public static double jauFame03(double t)
8377 {
8378 double a;
8379
8380
8381 /* Mean longitude of Mercury (IERS Conventions 2003). */
8382 a = fmod(4.402608842 + 2608.7903141574 * t, D2PI);
8383
8384 return a;
8385
8386 }
8387
8388
8389
8390 /**
8391 * Fundamental argument, IERS Conventions (2003):
8392 * mean longitude of Neptune.
8393 *
8394 *<p>This function is derived from the International Astronomical Union's
8395 * SOFA (Standards Of Fundamental Astronomy) software collection.
8396 *
8397 *<p>Status: canonical model.
8398 *
8399 *<!-- Given: -->
8400 * @param t double TDB, Julian centuries since J2000.0 (Note 1)
8401 *
8402 * <!-- Returned (function value): -->
8403 * @return double mean longitude of Neptune, radians (Note 2)
8404 *
8405 * <p>Notes:
8406 * <ol>
8407 *
8408 * <li> Though t is strictly TDB, it is usually more convenient to use
8409 * TT, which makes no significant difference.
8410 *
8411 * <li> The expression used is as adopted in IERS Conventions (2003) and
8412 * is adapted from Simon et al. (1994).
8413 *</ol>
8414 *<p>References:
8415 *
8416 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8417 * IERS Technical Note No. 32, BKG (2004)
8418 *
8419 * Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8420 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8421 *
8422 *@version 2009 December 16
8423 *
8424 * @since Release 20101201
8425 *
8426 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8427 */
8428 public static double jauFane03(double t)
8429 {
8430 double a;
8431
8432
8433 /* Mean longitude of Neptune (IERS Conventions 2003). */
8434 a = fmod(5.311886287 + 3.8133035638 * t, D2PI);
8435
8436 return a;
8437
8438 }
8439
8440
8441 /**
8442 * Fundamental argument, IERS Conventions (2003):
8443 * mean longitude of the Moon's ascending node.
8444 *
8445 *<p>This function is derived from the International Astronomical Union's
8446 * SOFA (Standards Of Fundamental Astronomy) software collection.
8447 *
8448 *<p>Status: canonical model.
8449 *
8450 *<!-- Given: -->
8451 * @param t double TDB, Julian centuries since J2000.0 (Note 1)
8452 *
8453 * <!-- Returned (function value): -->
8454 * @return double Omega, radians (Note 2)
8455 *
8456 * <p>Notes:
8457 * <ol>
8458 *
8459 * <li> Though t is strictly TDB, it is usually more convenient to use
8460 * TT, which makes no significant difference.
8461 *
8462 * <li> The expression used is as adopted in IERS Conventions (2003) and
8463 * is from Simon et al. (1994).
8464 *</ol>
8465 *<p>References:
8466 *
8467 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8468 * IERS Technical Note No. 32, BKG (2004)
8469 *
8470 * Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8471 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8472 *
8473 *@version 2009 December 16
8474 *
8475 * @since Release 20101201
8476 *
8477 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8478 */
8479 public static double jauFaom03(double t)
8480 {
8481 double a;
8482
8483
8484 /* Mean longitude of the Moon's ascending node */
8485 /* (IERS Conventions 2003). */
8486 a = fmod( 450160.398036 +
8487 t * ( - 6962890.5431 +
8488 t * ( 7.4722 +
8489 t * ( 0.007702 +
8490 t * ( - 0.00005939 ) ) ) ), TURNAS ) * DAS2R;
8491
8492 return a;
8493
8494 }
8495
8496
8497 /**
8498 * Fundamental argument, IERS Conventions (2003):
8499 * general accumulated precession in longitude.
8500 *
8501 *<p>This function is derived from the International Astronomical Union's
8502 * SOFA (Standards Of Fundamental Astronomy) software collection.
8503 *
8504 *<p>Status: canonical model.
8505 *
8506 *<!-- Given: -->
8507 * @param t double TDB, Julian centuries since J2000.0 (Note 1)
8508 *
8509 * <!-- Returned (function value): -->
8510 * @return double general precession in longitude, radians (Note 2)
8511 *
8512 * <p>Notes:
8513 * <ol>
8514 *
8515 * <li> Though t is strictly TDB, it is usually more convenient to use
8516 * TT, which makes no significant difference.
8517 *
8518 * <li> The expression used is as adopted in IERS Conventions (2003). It
8519 * is taken from Kinoshita & Souchay (1990) and comes originally
8520 * from Lieske et al. (1977).
8521 *</ol>
8522 *<p>References:
8523 *
8524 * Kinoshita, H. and Souchay J. 1990, Celest.Mech. and Dyn.Astron.
8525 * 48, 187
8526 *
8527 * <p>Lieske, J.H., Lederle, T., Fricke, W. & Morando, B. 1977,
8528 * Astron.Astrophys. 58, 1-16
8529 *
8530 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8531 * IERS Technical Note No. 32, BKG (2004)
8532 *
8533 *@version 2009 December 16
8534 *
8535 * @since Release 20101201
8536 *
8537 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8538 */
8539 public static double jauFapa03(double t)
8540 {
8541 double a;
8542
8543
8544 /* General accumulated precession in longitude. */
8545 a = (0.024381750 + 0.00000538691 * t) * t;
8546
8547 return a;
8548
8549 }
8550
8551
8552 /**
8553 * Fundamental argument, IERS Conventions (2003):
8554 * mean longitude of Saturn.
8555 *
8556 *<p>This function is derived from the International Astronomical Union's
8557 * SOFA (Standards Of Fundamental Astronomy) software collection.
8558 *
8559 *<p>Status: canonical model.
8560 *
8561 *<!-- Given: -->
8562 * @param t double TDB, Julian centuries since J2000.0 (Note 1)
8563 *
8564 * <!-- Returned (function value): -->
8565 * @return double mean longitude of Saturn, radians (Note 2)
8566 *
8567 * <p>Notes:
8568 * <ol>
8569 *
8570 * <li> Though t is strictly TDB, it is usually more convenient to use
8571 * TT, which makes no significant difference.
8572 *
8573 * <li> The expression used is as adopted in IERS Conventions (2003) and
8574 * comes from Souchay et al. (1999) after Simon et al. (1994).
8575 *</ol>
8576 *<p>References:
8577 *
8578 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8579 * IERS Technical Note No. 32, BKG (2004)
8580 *
8581 * Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8582 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8583 *
8584 * Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
8585 * Astron.Astrophys.Supp.Ser. 135, 111
8586 *
8587 *@version 2009 December 16
8588 *
8589 * @since Release 20101201
8590 *
8591 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8592 */
8593 public static double jauFasa03(double t)
8594 {
8595 double a;
8596
8597
8598 /* Mean longitude of Saturn (IERS Conventions 2003). */
8599 a = fmod(0.874016757 + 21.3299104960 * t, D2PI);
8600
8601 return a;
8602
8603 }
8604
8605
8606 /**
8607 * Fundamental argument, IERS Conventions (2003):
8608 * mean longitude of Uranus.
8609 *
8610 *<p>This function is derived from the International Astronomical Union's
8611 * SOFA (Standards Of Fundamental Astronomy) software collection.
8612 *
8613 *<p>Status: canonical model.
8614 *
8615 *<!-- Given: -->
8616 * @param t double TDB, Julian centuries since J2000.0 (Note 1)
8617 *
8618 * <!-- Returned (function value): -->
8619 * @return double mean longitude of Uranus, radians (Note 2)
8620 *
8621 * <p>Notes:
8622 * <ol>
8623 *
8624 * <li> Though t is strictly TDB, it is usually more convenient to use
8625 * TT, which makes no significant difference.
8626 *
8627 * <li> The expression used is as adopted in IERS Conventions (2003) and
8628 * is adapted from Simon et al. (1994).
8629 *</ol>
8630 *<p>References:
8631 *
8632 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8633 * IERS Technical Note No. 32, BKG (2004)
8634 *
8635 * Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8636 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8637 *
8638 *@version 2009 December 16
8639 *
8640 * @since Release 20101201
8641 *
8642 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8643 */
8644 public static double jauFaur03(double t)
8645 {
8646 double a;
8647
8648
8649 /* Mean longitude of Uranus (IERS Conventions 2003). */
8650 a = fmod(5.481293872 + 7.4781598567 * t, D2PI);
8651
8652 return a;
8653
8654 }
8655
8656
8657 /**
8658 * Fundamental argument, IERS Conventions (2003):
8659 * mean longitude of Venus.
8660 *
8661 *<p>This function is derived from the International Astronomical Union's
8662 * SOFA (Standards Of Fundamental Astronomy) software collection.
8663 *
8664 *<p>Status: canonical model.
8665 *
8666 *<!-- Given: -->
8667 * @param t double TDB, Julian centuries since J2000.0 (Note 1)
8668 *
8669 * <!-- Returned (function value): -->
8670 * @return double mean longitude of Venus, radians (Note 2)
8671 *
8672 * <p>Notes:
8673 * <ol>
8674 *
8675 * <li> Though t is strictly TDB, it is usually more convenient to use
8676 * TT, which makes no significant difference.
8677 *
8678 * <li> The expression used is as adopted in IERS Conventions (2003) and
8679 * comes from Souchay et al. (1999) after Simon et al. (1994).
8680 *</ol>
8681 *<p>References:
8682 *
8683 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8684 * IERS Technical Note No. 32, BKG (2004)
8685 *
8686 * Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8687 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8688 *
8689 * Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
8690 * Astron.Astrophys.Supp.Ser. 135, 111
8691 *
8692 *@version 2009 December 16
8693 *
8694 * @since Release 20101201
8695 *
8696 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8697 */
8698 public static double jauFave03(double t)
8699 {
8700 double a;
8701
8702
8703 /* Mean longitude of Venus (IERS Conventions 2003). */
8704 a = fmod(3.176146697 + 1021.3285546211 * t, D2PI);
8705
8706 return a;
8707
8708 }
8709
8710
8711 /**
8712 * Transform FK5 (J2000.0) star data into the Hipparcos system.
8713 *
8714 *<p>This function is derived from the International Astronomical Union's
8715 * SOFA (Standards Of Fundamental Astronomy) software collection.
8716 *
8717 *<p>Status: support function.
8718 *
8719 * Given (all FK5, equinox J2000.0, epoch J2000.0):
8720 * @param r5 double RA (radians)
8721 * @param d5 double Dec (radians)
8722 * @param dr5 double proper motion in RA (dRA/dt, rad/Jyear)
8723 * @param dd5 double proper motion in Dec (dDec/dt, rad/Jyear)
8724 * @param px5 double parallax (arcsec)
8725 * @param rv5 double radial velocity (km/s, positive = receding)
8726 *
8727 * Returned (all Hipparcos, epoch J2000.0):
8728 * @return catalogue coordinates
8729 *
8730 * <p>Notes:
8731 * <ol>
8732 *
8733 * <li> This function transforms FK5 star positions and proper motions
8734 * into the system of the Hipparcos catalog.
8735 *
8736 * <li> The proper motions in RA are dRA/dt rather than
8737 * cos(Dec)*dRA/dt, and are per year rather than per century.
8738 *
8739 * <li> The FK5 to Hipparcos transformation is modeled as a pure
8740 * rotation and spin; zonal errors in the FK5 catalog are not
8741 * taken into account.
8742 *
8743 * <li> See also {@link #jauH2fk5}, {@link #jauFk5hz}, {@link #jauHfk5z}.
8744 *</ol>
8745 *<p>Called:<ul>
8746 * <li>{@link #jauStarpv} star catalog data to space motion pv-vector
8747 * <li>{@link #jauFk5hip} FK5 to Hipparcos rotation and spin
8748 * <li>{@link #jauRxp} product of r-matrix and p-vector
8749 * <li>{@link #jauPxp} vector product of two p-vectors
8750 * <li>{@link #jauPpp} p-vector plus p-vector
8751 * <li>{@link #jauPvstar} space motion pv-vector to star catalog data
8752 * </ul>
8753 *<p>Reference:
8754 *
8755 * <p>F.Mignard & M.Froeschle, Astron. Astrophys. 354, 732-739 (2000).
8756 *
8757 *@version 2009 December 17
8758 *
8759 * @since Release 20101201
8760 *
8761 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8762 */
8763 public static CatalogCoords jauFk52h(double r5, double d5,
8764 double dr5, double dd5, double px5, double rv5)
8765 {
8766 int i;
8767 double pv5[][] = new double[2][3], r5h[][] = new double[3][3], s5h[] = new double[3], wxp[] = new double[3], vv[] = new double[3], pvh[][] = new double[2][3];
8768
8769
8770 /* FK5 barycentric position/velocity pv-vector (normalized). */
8771 jauStarpv(r5, d5, dr5, dd5, px5, rv5, pv5);
8772
8773 /* FK5 to Hipparcos orientation matrix and spin vector. */
8774 jauFk5hip(r5h, s5h);
8775
8776 /* Make spin units per day instead of per year. */
8777 for ( i = 0; i < 3; s5h[i++] /= 365.25 );
8778
8779 /* Orient the FK5 position into the Hipparcos system. */
8780 pvh[0] = jauRxp(r5h, pv5[0]);
8781
8782 /* Apply spin to the position giving an extra space motion component. */
8783 wxp = jauPxp(pv5[0],s5h);
8784
8785 /* Add this component to the FK5 space motion. */
8786 vv = jauPpp(wxp, pv5[1]);
8787
8788 /* Orient the FK5 space motion into the Hipparcos system. */
8789 pvh[1] = jauRxp(r5h, vv);
8790
8791 /* Hipparcos pv-vector to spherical. */
8792 CatalogCoords cat = null;
8793 try {
8794 cat = jauPvstar(pvh);
8795 } catch (JSOFAInternalError e) {
8796 //original code ignored possibility of error too...
8797 e.printStackTrace();
8798 }
8799
8800 return cat;
8801
8802 }
8803
8804
8805 /**
8806 * FK5 to Hipparcos rotation and spin.
8807 *
8808 *<p>This function is derived from the International Astronomical Union's
8809 * SOFA (Standards Of Fundamental Astronomy) software collection.
8810 *
8811 *<p>Status: support function.
8812 *
8813 *<!-- Returned: -->
8814 * @param r5h double[3][3] <u>returned</u> r-matrix: FK5 rotation wrt Hipparcos (Note 2)
8815 * @param s5h double[3] <u>returned</u> r-vector: FK5 spin wrt Hipparcos (Note 3)
8816 *
8817 * <p>Notes:
8818 * <ol>
8819 *
8820 * <li> This function models the FK5 to Hipparcos transformation as a
8821 * pure rotation and spin; zonal errors in the FK5 catalogue are
8822 * not taken into account.
8823 *
8824 * <li> The r-matrix r5h operates in the sense:
8825 *
8826 * P_Hipparcos = r5h x P_FK5
8827 *
8828 * where P_FK5 is a p-vector in the FK5 frame, and P_Hipparcos is
8829 * the equivalent Hipparcos p-vector.
8830 *
8831 * <li> The r-vector s5h represents the time derivative of the FK5 to
8832 * Hipparcos rotation. The units are radians per year (Julian,
8833 * TDB).
8834 *</ol>
8835 *<p>Called:<ul>
8836 * <li>{@link #jauRv2m} r-vector to r-matrix
8837 * </ul>
8838 *<p>Reference:
8839 *
8840 * <p>F.Mignard & M.Froeschle, Astron. Astrophys. 354, 732-739 (2000).
8841 *
8842 *@version 2009 March 14
8843 *
8844 * @since Release 20101201
8845 *
8846 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8847 */
8848 public static void jauFk5hip(double r5h[][], double s5h[] )
8849 {
8850 double v[] = new double[3];
8851
8852 /* FK5 wrt Hipparcos orientation and spin (radians, radians/year) */
8853 double epx, epy, epz;
8854 double omx, omy, omz;
8855
8856
8857 epx = -19.9e-3 * DAS2R;
8858 epy = -9.1e-3 * DAS2R;
8859 epz = 22.9e-3 * DAS2R;
8860
8861 omx = -0.30e-3 * DAS2R;
8862 omy = 0.60e-3 * DAS2R;
8863 omz = 0.70e-3 * DAS2R;
8864
8865 /* FK5 to Hipparcos orientation expressed as an r-vector. */
8866 v[0] = epx;
8867 v[1] = epy;
8868 v[2] = epz;
8869
8870 /* Re-express as an r-matrix. */
8871 double[][] r5ht = jauRv2m(v);
8872 jauCr(r5ht, r5h);
8873
8874 /* Hipparcos wrt FK5 spin expressed as an r-vector. */
8875 s5h[0] = omx;
8876 s5h[1] = omy;
8877 s5h[2] = omz;
8878
8879 return;
8880
8881 }
8882
8883 /**
8884 * Position consisting of (α, δ) pairs in radians. Where α is right ascension (or longitude angle) and δ is declination (or latitude angle).
8885 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 1 Feb 2010
8886 *
8887 * @since AIDA Stage 1
8888 */
8889 public static class SphericalCoordinate {
8890 public double alpha;
8891 public double delta;
8892 public SphericalCoordinate(double alpha, double delta){
8893 this.alpha = alpha;
8894 this.delta = delta;
8895 }
8896 }
8897
8898 /**
8899 * Spherical coordinate with equation of origins .
8900 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 28 Mar 2014
8901 * @version $Revision$ $date$
8902 */
8903 public static class SphericalCoordinateEO {
8904 public SphericalCoordinate pos;
8905 public double eo;
8906 /**
8907 * @param pos
8908 * @param eo
8909 */
8910 public SphericalCoordinateEO(SphericalCoordinate pos, double eo) {
8911 this.pos = pos;
8912 this.eo = eo;
8913 }
8914
8915
8916 }
8917 /**
8918 * Transform an FK5 (J2000.0) star position into the system of the
8919 * Hipparcos catalogue, assuming zero Hipparcos proper motion.
8920 *
8921 *<p>This function is derived from the International Astronomical Union's
8922 * SOFA (Standards Of Fundamental Astronomy) software collection.
8923 *
8924 *<p>Status: support function.
8925 *
8926 *<!-- Given: -->
8927 * @param r5 double FK5 RA (radians), equinox J2000.0, at date
8928 * @param d5 double FK5 Dec (radians), equinox J2000.0, at date
8929 * @param date1 double TDB date (Notes 1,2)
8930 * @param date2 double TDB date (Notes 1,2)
8931 *
8932 *<!-- Returned: -->
8933 * @return rh double <u>returned</u> Hipparcos RA (radians)
8934 * dh double <u>returned</u> Hipparcos Dec (radians)
8935 *
8936 * <p>Notes:
8937 * <ol>
8938 *
8939 * <li> This function converts a star position from the FK5 system to
8940 * the Hipparcos system, in such a way that the Hipparcos proper
8941 * motion is zero. Because such a star has, in general, a non-zero
8942 * proper motion in the FK5 system, the function requires the date
8943 * at which the position in the FK5 system was determined.
8944 *
8945 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
8946 * convenient way between the two arguments. For example,
8947 * JD(TT)=2450123.7 could be expressed in any of these ways,
8948 * among others:
8949 *<pre>
8950 * date1 date2
8951 *
8952 * 2450123.7 0.0 (JD method)
8953 * 2451545.0 -1421.3 (J2000 method)
8954 * 2400000.5 50123.2 (MJD method)
8955 * 2450123.5 0.2 (date & time method)
8956 *</pre>
8957 * The JD method is the most natural and convenient to use in
8958 * cases where the loss of several decimal digits of resolution
8959 * is acceptable. The J2000 method is best matched to the way
8960 * the argument is handled internally and will deliver the
8961 * optimum resolution. The MJD method and the date & time methods
8962 * are both good compromises between resolution and convenience.
8963 *
8964 * <li> The FK5 to Hipparcos transformation is modeled as a pure
8965 * rotation and spin; zonal errors in the FK5 catalogue are not
8966 * taken into account.
8967 *
8968 * <li> The position returned by this function is in the Hipparcos
8969 * reference system but at date date1+date2.
8970 *
8971 * <li> See also jauFk52h, jauH2fk5, jauHfk5z.
8972 *</ol>
8973 *<p>Called:<ul>
8974 * <li>{@link #jauS2c} spherical coordinates to unit vector
8975 * <li>{@link #jauFk5hip} FK5 to Hipparcos rotation and spin
8976 * <li>{@link #jauSxp} multiply p-vector by scalar
8977 * <li>{@link #jauRv2m} r-vector to r-matrix
8978 * <li>{@link #jauTrxp} product of transpose of r-matrix and p-vector
8979 * <li>{@link #jauPxp} vector product of two p-vectors
8980 * <li>{@link #jauC2s} p-vector to spherical
8981 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
8982 * </ul>
8983 *<p>Reference:
8984 *
8985 * <p>F.Mignard & M.Froeschle, 2000, Astron.Astrophys. 354, 732-739.
8986 *
8987 *@version 2009 December 17
8988 *
8989 * @since Release 20101201
8990 *
8991 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8992 */
8993 public static SphericalCoordinate jauFk5hz(double r5, double d5, double date1, double date2
8994 )
8995 {
8996 double t, p5e[] = new double[3], r5h[][] = new double[3][3], s5h[] = new double[3], vst[] = new double[3], rst[][] = new double[3][3], p5[] = new double[3],
8997 ph[] = new double[3];
8998
8999
9000 /* Interval from given date to fundamental epoch J2000.0 (JY). */
9001 t = - ((date1 - DJ00) + date2) / DJY;
9002
9003 /* FK5 barycentric position vector. */
9004 p5e = jauS2c(r5,d5);
9005
9006 /* FK5 to Hipparcos orientation matrix and spin vector. */
9007 jauFk5hip(r5h, s5h);
9008
9009 /* Accumulated Hipparcos wrt FK5 spin over that interval. */
9010 vst = jauSxp(t,s5h);
9011
9012 /* Express the accumulated spin as a rotation matrix. */
9013 rst = jauRv2m(vst);
9014
9015 /* Derotate the vector's FK5 axes back to date. */
9016 p5 = jauTrxp(rst, p5e);
9017
9018 /* Rotate the vector into the Hipparcos system. */
9019 ph = jauRxp(r5h, p5);
9020
9021 /* Hipparcos vector to spherical. */
9022 SphericalCoordinate sc = jauC2s(ph);
9023 double rh = jauAnp(sc.alpha);
9024 sc.alpha = rh;
9025
9026 return sc;
9027
9028 }
9029
9030
9031 /**
9032 * Form rotation matrix given the Fukushima-Williams angles.
9033 *
9034 *<p>This function is derived from the International Astronomical Union's
9035 * SOFA (Standards Of Fundamental Astronomy) software collection.
9036 *
9037 *<p>Status: support function.
9038 *
9039 *<!-- Given: -->
9040 * @param gamb double F-W angle gamma_bar (radians)
9041 * @param phib double F-W angle phi_bar (radians)
9042 * @param psi double F-W angle psi (radians)
9043 * @param eps double F-W angle epsilon (radians)
9044 *
9045 *<!-- Returned: -->
9046 * @return r double[3][3] <u>returned</u> rotation matrix
9047 *
9048 * <p>Notes:
9049 * <ol>
9050 *
9051 * <li> Naming the following points:
9052 *
9053 * e = J2000.0 ecliptic pole,
9054 * p = GCRS pole,
9055 * E = ecliptic pole of date,
9056 * and P = CIP,
9057 *
9058 * the four Fukushima-Williams angles are as follows:
9059 *
9060 * gamb = gamma = epE
9061 * phib = phi = pE
9062 * psi = psi = pEP
9063 * eps = epsilon = EP
9064 *
9065 * <li> The matrix representing the combined effects of frame bias,
9066 * precession and nutation is:
9067 *
9068 * NxPxB = R_1(-eps).R_3(-psi).R_1(phib).R_3(gamb)
9069 *
9070 * <li> Three different matrices can be constructed, depending on which angles are supplied as the arguments gamb,
9071 * phib, psi and eps:
9072 *
9073 * o To obtain the nutation x precession x frame bias matrix,
9074 * first generate the four precession angles known conventionally
9075 * as gamma_bar, phi_bar, psi_bar and epsilon_A, then generate
9076 * the nutation components Dpsi and Depsilon and add them to
9077 * psi_bar and epsilon_A, and finally call the present function
9078 * using those four angles as arguments.
9079 *
9080 * o To obtain the precession x frame bias matrix, generate the
9081 * four precession angles and call the present function.
9082 *
9083 * o To obtain the frame bias matrix, generate the four precession
9084 * angles for date J2000.0 and call the present function.
9085 *
9086 * The nutation-only and precession-only matrices can if necessary
9087 * be obtained by combining these three appropriately.
9088 *</ol>
9089 *<p>Called:<ul>
9090 * <li>{@link #jauIr} initialize r-matrix to identity
9091 * <li>{@link #jauRz} rotate around Z-axis
9092 * <li>{@link #jauRx} rotate around X-axis
9093 * </ul>
9094 *<p>References:
9095 *
9096 * Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855
9097 * Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351
9098 *
9099 *@version 2020 November 13
9100 *
9101 * @since Release 20101201
9102 *
9103 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
9104 */
9105 public static double[][] jauFw2m(double gamb, double phib, double psi, double eps)
9106 {
9107 /* Construct the matrix. */
9108 double r[][] = new double[3][3];
9109 jauIr(r);
9110 jauRz(gamb, r);
9111 jauRx(phib, r);
9112 jauRz(-psi, r);
9113 jauRx(-eps, r);
9114
9115 return r;
9116
9117 }
9118
9119
9120 /**
9121 * CIP X,Y given Fukushima-Williams bias-precession-nutation angles.
9122 *
9123 *<p>This function is derived from the International Astronomical Union's
9124 * SOFA (Standards Of Fundamental Astronomy) software collection.
9125 *
9126 *<p>Status: support function.
9127 *
9128 *<!-- Given: -->
9129 * @param gamb double F-W angle gamma_bar (radians)
9130 * @param phib double F-W angle phi_bar (radians)
9131 * @param psi double F-W angle psi (radians)
9132 * @param eps double F-W angle epsilon (radians)
9133 *
9134 *<!-- Returned: -->
9135 * @return CIP unit vector X,Y
9136 *
9137 * <p>Notes:
9138 * <ol>
9139 *
9140 * <li> Naming the following points:
9141 *
9142 * e = J2000.0 ecliptic pole,
9143 * p = GCRS pole
9144 * E = ecliptic pole of date,
9145 * and P = CIP,
9146 *
9147 * the four Fukushima-Williams angles are as follows:
9148 *
9149 * gamb = gamma = epE
9150 * phib = phi = pE
9151 * psi = psi = pEP
9152 * eps = epsilon = EP
9153 *
9154 * <li> The matrix representing the combined effects of frame bias,
9155 * precession and nutation is:
9156 *
9157 * NxPxB = R_1(-epsA).R_3(-psi).R_1(phib).R_3(gamb)
9158 *
9159 * The returned values x,y are elements [2][0] and [2][1] of the
9160 * matrix. Near J2000.0, they are essentially angles in radians
9161 *
9162 * X,Y are elements (3,1) and (3,2) of the matrix.
9163 *</ol>
9164 *<p>Called:<ul>
9165 * <li>{@link #jauFw2m} F-W angles to r-matrix
9166 * <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
9167 * </ul>
9168 *<p>Reference:
9169 *
9170 * Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351
9171 *
9172 *@version 2009 December 17
9173 *
9174 * @since Release 20101201
9175 *
9176 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
9177 */
9178 public static CelestialIntermediatePole jauFw2xy(double gamb, double phib, double psi, double eps)
9179 {
9180 double r[][] = new double[3][3];
9181
9182
9183 /* Form NxPxB matrix. */
9184 r = jauFw2m(gamb, phib, psi, eps);
9185
9186 /* Extract CIP X,Y. */
9187 return jauBpn2xy(r);
9188
9189 }
9190
9191 /**
9192 * Geodetic coordinates.
9193 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
9194 *
9195 * @since AIDA Stage 1
9196 */
9197 public static class GeodeticCoord {
9198 /** longitude (radians, east +ve) */
9199 public double elong;
9200 /** latitude (geodetic, radians) */
9201 public double phi;
9202 /** height above ellipsoid (geodetic) */
9203 public double height;
9204 public GeodeticCoord(double elong, double phi, double height) {
9205 this.elong = elong;
9206 this.phi = phi;
9207 this.height = height;
9208 }
9209 }
9210 /**
9211 * Transform geocentric coordinates to geodetic using the specified
9212 * reference ellipsoid.
9213 *
9214 *<p>This function is derived from the International Astronomical Union's
9215 * JSOFA (Standards of Fundamental Astronomy) software collection.
9216 *
9217 *<p>Status: canonical transformation.
9218 *
9219 *<!-- Given: -->
9220 * @param n int ellipsoid identifier (Note 1)
9221 * @param xyz double[3] geocentric vector (Note 2)
9222 *
9223 *<!-- Returned: -->
9224 * @return elong double <u>returned</u> longitude (radians, east +ve)
9225 * phi double <u>returned</u> latitude (geodetic, radians, Note 3)
9226 * height double <u>returned</u> height above ellipsoid (geodetic, Notes 2,3)
9227 *
9228 * <!-- Returned (function value): -->
9229 * @throws JSOFAIllegalParameter 0 = OK
9230 * -1 = illegal identifier (Note 3)
9231 * -2 = internal error (Note 3)
9232 *
9233 * <p>Notes:
9234 * <ol>
9235 *
9236 * <li> The identifier n is a number that specifies the choice of
9237 * reference ellipsoid. The following are supported:
9238 *
9239 * n ellipsoid
9240 *
9241 * 1 WGS84
9242 * 2 GRS80
9243 *
9244 * The number n has no significance outside the JSOFA software.
9245 *
9246 * <li> The geocentric vector (xyz, given) and height (height, returned)
9247 * are in meters.
9248 *
9249 * <li> An error status -1 means that the identifier n is illegal. An
9250 * error status -2 is theoretically impossible. In all error cases,
9251 * phi and height are both set to -1e9.
9252 *
9253 * <li> The inverse transformation is performed in the function jauGd2gc.
9254 *</ol>
9255 *<p>Called:<ul>
9256 * <li>{@link #jauEform} Earth reference ellipsoids
9257 * <li>{@link #jauGc2gde} geocentric to geodetic transformation, general
9258 * </ul>
9259 *@version 2010 January 18
9260 *
9261 * @since Release 20101201
9262 *
9263 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
9264 */
9265 public static GeodeticCoord jauGc2gd ( int n, double xyz[] ) throws JSOFAIllegalParameter
9266 {
9267 GeodeticCoord gc;
9268
9269
9270 /* Obtain reference ellipsoid parameters. */
9271 ReferenceEllipsoid el = jauEform ( n );
9272
9273 /* If OK, transform x,y,z to longitude, geodetic latitude, height. */
9274 gc = jauGc2gde ( el.a, el.f, xyz);
9275
9276 /* Return the status. */
9277 return gc;
9278
9279
9280 }
9281
9282 /**
9283 * Transform geocentric coordinates to geodetic for a reference
9284 * ellipsoid of specified form.
9285 *
9286 *<p>This function is derived from the International Astronomical Union's
9287 * JSOFA (Standards of Fundamental Astronomy) software collection.
9288 *
9289 *<p>Status: support function.
9290 *
9291 *<!-- Given: -->
9292 * @param a double equatorial radius (Notes 2,4)
9293 * @param f double flattening (Note 3)
9294 * @param xyz double[3] geocentric vector (Note 4)
9295 *
9296 *<!-- Returned: -->
9297 * @return GeodeticCoord logitude (radians, east +ve) latitude (geodetic, radians) height above ellipsoid (geodetic, Note 4)
9298 *
9299 * @throws JSOFAIllegalParameter int status:
9300 *
9301 * -1 = illegal a
9302 * -2 = illegal f
9303 *
9304 * <p>Notes:
9305 * <ol>
9306 *
9307 * <li> This function is based on the GCONV2H Fortran subroutine by
9308 * Toshio Fukushima (see reference).
9309 *
9310 * <li> The equatorial radius, a, can be in any units, but meters is
9311 * the conventional choice.
9312 *
9313 * <li> The flattening, f, is (for the Earth) a value around 0.00335,
9314 * i.e. around 1/298.
9315 *
9316 * <li> The equatorial radius, a, and the geocentric vector, xyz,
9317 * must be given in the same units, and determine the units of
9318 * the returned height, height.
9319 *
9320 * <li> If an error occurs (status < 0), elong, phi and height are
9321 * unchanged.
9322 *
9323 * <li> The inverse transformation is performed in the function
9324 * jauGd2gce.
9325 *
9326 * <li> The transformation for a standard ellipsoid (such as WGS84) can
9327 * more conveniently be performed by calling jauGc2gd, which uses a
9328 * numerical code (1 for WGS84) to identify the required A and F
9329 * values.
9330 *</ol>
9331 *<p>Reference:
9332 *
9333 * Fukushima, T., "Transformation from Cartesian to geodetic
9334 * coordinates accelerated by Halley's method", J.Geodesy (2006)
9335 * 79: 689-693
9336 *
9337 *@version 2009 November 2
9338 *
9339 * @since Release 20101201
9340 *
9341 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
9342 *
9343 */
9344 public static GeodeticCoord jauGc2gde ( double a, double f, double xyz[] ) throws JSOFAIllegalParameter
9345 {
9346 double aeps2, e2, e4t, ec2, ec, b, x, y, z, p2, absz, p, s0, pn, zc,
9347 c0, c02, c03, s02, s03, a02, a0, a03, d0, f0, b0, s1,
9348 cc, s12, cc2;
9349
9350 double phi, height;
9351 /* ------------- */
9352 /* Preliminaries */
9353 /* ------------- */
9354
9355 /* Validate ellipsoid parameters. */
9356 if ( f < 0.0 || f >= 1.0 ) throw new JSOFAIllegalParameter("bad f", -1);
9357 if ( a <= 0.0 ) throw new JSOFAIllegalParameter("bad a", -2);
9358
9359 /* Functions of ellipsoid parameters (with further validation of f). */
9360 aeps2 = a*a * 1e-32;
9361 e2 = (2.0 - f) * f;
9362 e4t = e2*e2 * 1.5;
9363 ec2 = 1.0 - e2;
9364 if ( ec2 <= 0.0 ) throw new JSOFAIllegalParameter("bad f", -1);
9365 ec = sqrt(ec2);
9366 b = a * ec;
9367
9368 /* Cartesian components. */
9369 x = xyz[0];
9370 y = xyz[1];
9371 z = xyz[2];
9372
9373 /* Distance from polar axis squared. */
9374 p2 = x*x + y*y;
9375
9376 /* Longitude. */
9377 double elong = p2 > 0.0 ? atan2(y, x) : 0.0;
9378
9379 /* Unsigned z-coordinate. */
9380 absz = abs(z);
9381
9382 /* Proceed unless polar case. */
9383 if ( p2 > aeps2 ) {
9384
9385 /* Distance from polar axis. */
9386 p = sqrt(p2);
9387
9388 /* Normalization. */
9389 s0 = absz / a;
9390 pn = p / a;
9391 zc = ec * s0;
9392
9393 /* Prepare Newton correction factors. */
9394 c0 = ec * pn;
9395 c02 = c0 * c0;
9396 c03 = c02 * c0;
9397 s02 = s0 * s0;
9398 s03 = s02 * s0;
9399 a02 = c02 + s02;
9400 a0 = sqrt(a02);
9401 a03 = a02 * a0;
9402 d0 = zc*a03 + e2*s03;
9403 f0 = pn*a03 - e2*c03;
9404
9405 /* Prepare Halley correction factor. */
9406 b0 = e4t * s02 * c02 * pn * (a0 - ec);
9407 s1 = d0*f0 - b0*s0;
9408 cc = ec * (f0*f0 - b0*c0);
9409
9410 /* Evaluate latitude and height. */
9411 phi = atan(s1/cc);
9412 s12 = s1 * s1;
9413 cc2 = cc * cc;
9414 height = (p*cc + absz*s1 - a * sqrt(ec2*s12 + cc2)) /
9415 sqrt(s12 + cc2);
9416 } else {
9417
9418 /* Exception: pole. */
9419 phi = DPI / 2.0;
9420 height = absz - b;
9421 }
9422
9423 /* Restore sign of latitude. */
9424 if ( z < 0 ) phi = -phi;
9425
9426 /* OK status. */
9427 return new GeodeticCoord(elong, phi, height);
9428
9429
9430 }
9431
9432
9433 /**
9434 * Transform geodetic coordinates to geocentric using the specified
9435 * reference ellipsoid.
9436 *
9437 *<p>This function is derived from the International Astronomical Union's
9438 * JSOFA (Standards of Fundamental Astronomy) software collection.
9439 *
9440 *<p>Status: canonical transformation.
9441 *
9442 *<!-- Given: -->
9443 * @param n int ellipsoid identifier (Note 1)
9444 * @param elong double longitude (radians, east +ve)
9445 * @param phi double latitude (geodetic, radians, Note 3)
9446 * @param height double height above ellipsoid (geodetic, Notes 2,3)
9447 *
9448 *<!-- Returned: -->
9449 * @return xyz double[3] <u>returned</u> geocentric vector (Note 2)
9450 *
9451 * <!-- Returned (function value): -->
9452 * @throws JSOFAIllegalParameter -1 = illegal identifier (Note 3)
9453 * -2 = illegal case (Note 3)
9454 *
9455 * <p>Notes:
9456 * <ol>
9457 *
9458 * <li> The identifier n is a number that specifies the choice of
9459 * reference ellipsoid. The following are supported:
9460 *
9461 * n ellipsoid
9462 *
9463 * 1 WGS84
9464 * 2 GRS80
9465 *
9466 * The number n has no significance outside the JSOFA software.
9467 *
9468 * <li> The height (height, given) and the geocentric vector (xyz,
9469 * returned) are in meters.
9470 *
9471 * <li> No validation is performed on the arguments elong, phi and
9472 * height. An error status -1 means that the identifier n is
9473 * illegal. An error status -2 protects against cases that would
9474 * lead to arithmetic exceptions. In all error cases, xyz is set
9475 * to zeros.
9476 *
9477 * <li> The inverse transformation is performed in the function jauGc2gd.
9478 *</ol>
9479 *<p>Called:<ul>
9480 * <li>{@link #jauEform} Earth reference ellipsoids
9481 * <li>{@link #jauGd2gce} geodetic to geocentric transformation, general
9482 * <li>{@link #jauZp} zero p-vector
9483 * </ul>
9484 *@version 2010 January 18
9485 *
9486 * @since Release 20101201
9487 *
9488 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
9489 */
9490 public static double[] jauGd2gc ( int n, double elong, double phi, double height ) throws JSOFAIllegalParameter, JSOFAInternalError
9491 {
9492
9493
9494 /* Obtain reference ellipsoid parameters. */
9495 ReferenceEllipsoid em = jauEform ( n );
9496
9497 /* If OK, transform longitude, geodetic latitude, height to x,y,z. */
9498 return jauGd2gce ( em.a, em.f, elong, phi, height );
9499
9500
9501 }
9502
9503
9504 /**
9505 * Transform geodetic coordinates to geocentric for a reference
9506 * ellipsoid of specified form.
9507 *
9508 *<p>This function is derived from the International Astronomical Union's
9509 * JSOFA (Standards of Fundamental Astronomy) software collection.
9510 *
9511 *<p>Status: support function.
9512 *
9513 *<!-- Given: -->
9514 * @param a double equatorial radius (Notes 1,4)
9515 * @param f double flattening (Notes 2,4)
9516 * @param elong double longitude (radians, east +ve)
9517 * @param phi double latitude (geodetic, radians, Note 4)
9518 * @param height double height above ellipsoid (geodetic, Notes 3,4)
9519 *
9520 *<!-- Returned: -->
9521 * @return xyz double[3] <u>returned</u> geocentric vector (Note 3)
9522 *
9523 * <!-- Returned (function value): -->
9524 *
9525 * @throws JSOFAInternalError 0 = OK
9526 * -1 = illegal case (Note 4)
9527 * <p>Notes:
9528 * <ol>
9529 *
9530 * <li> The equatorial radius, a, can be in any units, but meters is
9531 * the conventional choice.
9532 *
9533 * <li> The flattening, f, is (for the Earth) a value around 0.00335,
9534 * i.e. around 1/298.
9535 *
9536 * <li> The equatorial radius, a, and the height, height, must be
9537 * given in the same units, and determine the units of the
9538 * returned geocentric vector, xyz.
9539 *
9540 * <li> No validation is performed on individual arguments. The error
9541 * status -1 protects against (unrealistic) cases that would lead
9542 * to arithmetic exceptions. If an error occurs, xyz is unchanged.
9543 *
9544 * <li> The inverse transformation is performed in the function
9545 * jauGc2gde.
9546 *
9547 * <li> The transformation for a standard ellipsoid (such as WGS84) can
9548 * more conveniently be performed by calling jauGd2gc, which uses a
9549 * numerical code (1 for WGS84) to identify the required a and f
9550 * values.
9551 *</ol>
9552 *<p>References:
9553 *
9554 * <p>Green, R.M., Spherical Astronomy, Cambridge University Press,
9555 * (1985) Section 4.5, p96.
9556 *
9557 * <p>Explanatory Supplement to the Astronomical Almanac,
9558 * P. Kenneth Seidelmann (ed), University Science Books (1992),
9559 * Section 4.22, p202.
9560 *
9561 *@version 2009 November 2
9562 *
9563 * @since Release 20101201
9564 *
9565 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
9566 */
9567 public static double[] jauGd2gce ( double a, double f, double elong, double phi,
9568 double height ) throws JSOFAInternalError
9569 {
9570 double sp, cp, w, d, ac, as, r;
9571 double xyz[] = new double[3];
9572
9573
9574 /* Functions of geodetic latitude. */
9575 sp = sin(phi);
9576 cp = cos(phi);
9577 w = 1.0 - f;
9578 w = w * w;
9579 d = cp*cp + w*sp*sp;
9580 if ( d <= 0.0 ) throw new JSOFAInternalError("illegal combination of arguments d< 0", -1);
9581 ac = a / sqrt(d);
9582 as = w * ac;
9583
9584 /* Geocentric vector. */
9585 r = (ac + height) * cp;
9586 xyz[0] = r * cos(elong);
9587 xyz[1] = r * sin(elong);
9588 xyz[2] = (as + height) * sp;
9589
9590 /* Success. */
9591 return xyz;
9592
9593
9594 }
9595
9596
9597 /**
9598 * Greenwich mean sidereal time (model consistent with IAU 2000
9599 * resolutions).
9600 *
9601 *<p>This function is derived from the International Astronomical Union's
9602 * SOFA (Standards Of Fundamental Astronomy) software collection.
9603 *
9604 *<p>Status: canonical model.
9605 *
9606 *<!-- Given: -->
9607 * @param uta double UT1 as a 2-part Julian Date (Notes 1,2)
9608 * @param utb double UT1 as a 2-part Julian Date (Notes 1,2)
9609 * @param tta double TT as a 2-part Julian Date (Notes 1,2)
9610 * @param ttb double TT as a 2-part Julian Date (Notes 1,2)
9611 *
9612 * <!-- Returned (function value): -->
9613 * @return double Greenwich mean sidereal time (radians)
9614 *
9615 * <p>Notes:
9616 * <ol>
9617 *
9618 * <li> The UT1 and TT dates uta+utb and tta+ttb respectively, are both
9619 * Julian Dates, apportioned in any convenient way between the
9620 * argument pairs. For example, JD=2450123.7 could be expressed in
9621 * any of these ways, among others:
9622 *<pre>
9623 * Part A Part B
9624 *
9625 * 2450123.7 0.0 (JD method)
9626 * 2451545.0 -1421.3 (J2000 method)
9627 * 2400000.5 50123.2 (MJD method)
9628 * 2450123.5 0.2 (date & time method)
9629 *</pre>
9630 * The JD method is the most natural and convenient to use in
9631 * cases where the loss of several decimal digits of resolution
9632 * is acceptable (in the case of UT; the TT is not at all critical
9633 * in this respect). The J2000 and MJD methods are good compromises
9634 * between resolution and convenience. For UT, the date & time
9635 * method is best matched to the algorithm that is used by the Earth
9636 * Rotation Angle function, called internally: maximum precision is
9637 * delivered when the uta argument is for 0hrs UT1 on the day in
9638 * question and the utb argument lies in the range 0 to 1, or vice
9639 * versa.
9640 *
9641 * <li> Both UT1 and TT are required, UT1 to predict the Earth rotation
9642 * and TT to predict the effects of precession. If UT1 is used for
9643 * both purposes, errors of order 100 microarcseconds result.
9644 *
9645 * <li> This GMST is compatible with the IAU 2000 resolutions and must be
9646 * used only in conjunction with other IAU 2000 compatible
9647 * components such as precession-nutation and equation of the
9648 * equinoxes.
9649 *
9650 * <li> The result is returned in the range 0 to 2pi.
9651 *
9652 * <li> The algorithm is from Capitaine et al. (2003) and IERS
9653 * Conventions 2003.
9654 *</ol>
9655 *<p>Called:<ul>
9656 * <li>{@link #jauEra00} Earth rotation angle, IAU 2000
9657 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
9658 * </ul>
9659 *<p>References:
9660 *
9661 * <p>Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
9662 * implement the IAU 2000 definition of UT1", Astronomy &
9663 * Astrophysics, 406, 1135-1149 (2003)
9664 *
9665 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
9666 * IERS Technical Note No. 32, BKG (2004)
9667 *
9668 *@version 2009 March 16
9669 *
9670 * @since Release 20101201
9671 *
9672 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
9673 */
9674 public static double jauGmst00(double uta, double utb, double tta, double ttb)
9675 {
9676 double t, gmst;
9677
9678
9679 /* TT Julian centuries since J2000.0. */
9680 t = ((tta - DJ00) + ttb) / DJC;
9681
9682 /* Greenwich Mean Sidereal Time, IAU 2000. */
9683 gmst = jauAnp(jauEra00(uta, utb) +
9684 ( 0.014506 +
9685 ( 4612.15739966 +
9686 ( 1.39667721 +
9687 ( -0.00009344 +
9688 ( 0.00001882 )
9689 * t) * t) * t) * t) * DAS2R);
9690
9691 return gmst;
9692
9693 }
9694
9695
9696 /**
9697 * Greenwich mean sidereal time (consistent with IAU 2006 precession).
9698 *
9699 *<p>This function is derived from the International Astronomical Union's
9700 * SOFA (Standards Of Fundamental Astronomy) software collection.
9701 *
9702 *<p>Status: canonical model.
9703 *
9704 *<!-- Given: -->
9705 * @param uta double UT1 as a 2-part Julian Date (Notes 1,2)
9706 * @param utb double UT1 as a 2-part Julian Date (Notes 1,2)
9707 * @param tta double TT as a 2-part Julian Date (Notes 1,2)
9708 * @param ttb double TT as a 2-part Julian Date (Notes 1,2)
9709 *
9710 * <!-- Returned (function value): -->
9711 * @return double Greenwich mean sidereal time (radians)
9712 *
9713 * <p>Notes:
9714 * <ol>
9715 *
9716 * <li> The UT1 and TT dates uta+utb and tta+ttb respectively, are both
9717 * Julian Dates, apportioned in any convenient way between the
9718 * argument pairs. For example, JD=2450123.7 could be expressed in
9719 * any of these ways, among others:
9720 *<pre>
9721 * Part A Part B
9722 *
9723 * 2450123.7 0.0 (JD method)
9724 * 2451545.0 -1421.3 (J2000 method)
9725 * 2400000.5 50123.2 (MJD method)
9726 * 2450123.5 0.2 (date & time method)
9727 *</pre>
9728 * The JD method is the most natural and convenient to use in
9729 * cases where the loss of several decimal digits of resolution
9730 * is acceptable (in the case of UT; the TT is not at all critical
9731 * in this respect). The J2000 and MJD methods are good compromises
9732 * between resolution and convenience. For UT, the date & time
9733 * method is best matched to the algorithm that is used by the Earth
9734 * rotation angle function, called internally: maximum precision is
9735 * delivered when the uta argument is for 0hrs UT1 on the day in
9736 * question and the utb argument lies in the range 0 to 1, or vice
9737 * versa.
9738 *
9739 * <li> Both UT1 and TT are required, UT1 to predict the Earth rotation
9740 * and TT to predict the effects of precession. If UT1 is used for
9741 * both purposes, errors of order 100 microarcseconds result.
9742 *
9743 * <li> This GMST is compatible with the IAU 2006 precession and must not
9744 * be used with other precession models.
9745 *
9746 * <li> The result is returned in the range 0 to 2pi.
9747 *</ol>
9748 *<p>Called:<ul>
9749 * <li>{@link #jauEra00} Earth rotation angle, IAU 2000
9750 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
9751 * </ul>
9752 *<p>Reference:
9753 *
9754 * <p>Capitaine, N., Wallace, P.T. & Chapront, J., 2005,
9755 * Astron.Astrophys. 432, 355
9756 *
9757 *@version 2008 May 24
9758 *
9759 * @since Release 20101201
9760 *
9761 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
9762 */
9763 public static double jauGmst06(double uta, double utb, double tta, double ttb)
9764 {
9765 double t, gmst;
9766
9767
9768 /* TT Julian centuries since J2000.0. */
9769 t = ((tta - DJ00) + ttb) / DJC;
9770
9771 /* Greenwich mean sidereal time, IAU 2006. */
9772 gmst = jauAnp(jauEra00(uta, utb) +
9773 ( 0.014506 +
9774 ( 4612.156534 +
9775 ( 1.3915817 +
9776 ( -0.00000044 +
9777 ( -0.000029956 +
9778 ( -0.0000000368 )
9779 * t) * t) * t) * t) * t) * DAS2R);
9780
9781 return gmst;
9782
9783 }
9784
9785
9786 /**
9787 * Universal Time to Greenwich mean sidereal time (IAU 1982 model).
9788 *
9789 *<p>This function is derived from the International Astronomical Union's
9790 * SOFA (Standards Of Fundamental Astronomy) software collection.
9791 *
9792 *<p>Status: canonical model.
9793 *
9794 *<!-- Given: -->
9795 * @param dj1 double UT1 Julian Date (see note)
9796 * @param dj2 double UT1 Julian Date (see note)
9797 *
9798 * <!-- Returned (function value): -->
9799 * @return double Greenwich mean sidereal time (radians)
9800 *
9801 * <p>Notes:
9802 * <ol>
9803 *
9804 * <li> The UT1 date dj1+dj2 is a Julian Date, apportioned in any
9805 * convenient way between the arguments dj1 and dj2. For example,
9806 * JD(UT1)=2450123.7 could be expressed in any of these ways,
9807 * among others:
9808 *<pre>
9809 * dj1 dj2
9810 *
9811 * 2450123.7D0 0D0 (JD method)
9812 * 2451545D0 -1421.3D0 (J2000 method)
9813 * 2400000.5D0 50123.2D0 (MJD method)
9814 * 2450123.5D0 0.2D0 (date & time method)
9815 *</pre>
9816 * The JD method is the most natural and convenient to use in
9817 * cases where the loss of several decimal digits of resolution
9818 * is acceptable. The J2000 and MJD methods are good compromises
9819 * between resolution and convenience. The date & time method is
9820 * best matched to the algorithm used: maximum accuracy (or, at
9821 * least, minimum noise) is delivered when the dj1 argument is for
9822 * 0hrs UT1 on the day in question and the dj2 argument lies in the
9823 * range 0 to 1, or vice versa.
9824 *
9825 * <li> The algorithm is based on the IAU 1982 expression. This is
9826 * always described as giving the GMST at 0 hours UT1. In fact, it
9827 * gives the difference between the GMST and the UT, the steady
9828 * 4-minutes-per-day drawing-ahead of ST with respect to UT. When
9829 * whole days are ignored, the expression happens to equal the GMST
9830 * at 0 hours UT1 each day.
9831 *
9832 * <li> In this function, the entire UT1 (the sum of the two arguments
9833 * dj1 and dj2) is used directly as the argument for the standard
9834 * formula, the constant term of which is adjusted by 12 hours to
9835 * take account of the noon phasing of Julian Date. The UT1 is then
9836 * added, but omitting whole days to conserve accuracy.
9837 *</ol>
9838 *<p>Called:<ul>
9839 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
9840 * </ul>
9841 *<p>References:
9842 *
9843 * <p>Transactions of the International Astronomical Union,
9844 * XVIII B, 67 (1983).
9845 *
9846 * <p>Aoki et al., Astron. Astrophys. 105, 359-361 (1982).
9847 *
9848 *@version 2008 May 24
9849 *
9850 * @since Release 20101201
9851 *
9852 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
9853 */
9854 public static double jauGmst82(double dj1, double dj2)
9855 {
9856 /* Coefficients of IAU 1982 GMST-UT1 model */
9857 double A = 24110.54841 - DAYSEC / 2.0;
9858 double B = 8640184.812866;
9859 double C = 0.093104;
9860 double D = -6.2e-6;
9861
9862 /* The first constant, A, has to be adjusted by 12 hours */
9863 /* because the UT1 is supplied as a Julian date, which begins */
9864 /* at noon. */
9865
9866 double d1, d2, t, f, gmst;
9867
9868
9869 /* Julian centuries since fundamental epoch. */
9870 if (dj1 < dj2) {
9871 d1 = dj1;
9872 d2 = dj2;
9873 } else {
9874 d1 = dj2;
9875 d2 = dj1;
9876 }
9877 t = (d1 + (d2 - DJ00)) / DJC;
9878
9879 /* Fractional part of JD(UT1), in seconds. */
9880 f = DAYSEC * (fmod(d1, 1.0) + fmod(d2, 1.0));
9881
9882 /* GMST at this UT1. */
9883 gmst = jauAnp(DS2R * ((A + (B + (C + D * t) * t) * t) + f));
9884
9885 return gmst;
9886
9887 }
9888
9889
9890 /**
9891 * Greenwich apparent sidereal time (consistent with IAU 2000
9892 * resolutions).
9893 *
9894 *<p>This function is derived from the International Astronomical Union's
9895 * SOFA (Standards Of Fundamental Astronomy) software collection.
9896 *
9897 *<p>Status: canonical model.
9898 *
9899 *<!-- Given: -->
9900 * @param uta double UT1 as a 2-part Julian Date (Notes 1,2)
9901 * @param utb double UT1 as a 2-part Julian Date (Notes 1,2)
9902 * @param tta double TT as a 2-part Julian Date (Notes 1,2)
9903 * @param ttb double TT as a 2-part Julian Date (Notes 1,2)
9904 *
9905 * <!-- Returned (function value): -->
9906 * @return double Greenwich apparent sidereal time (radians)
9907 *
9908 * <p>Notes:
9909 * <ol>
9910 *
9911 * <li> The UT1 and TT dates uta+utb and tta+ttb respectively, are both
9912 * Julian Dates, apportioned in any convenient way between the
9913 * argument pairs. For example, JD=2450123.7 could be expressed in
9914 * any of these ways, among others:
9915 *<pre>
9916 * Part A Part B
9917 *
9918 * 2450123.7 0.0 (JD method)
9919 * 2451545.0 -1421.3 (J2000 method)
9920 * 2400000.5 50123.2 (MJD method)
9921 * 2450123.5 0.2 (date & time method)
9922 *</pre>
9923 * The JD method is the most natural and convenient to use in
9924 * cases where the loss of several decimal digits of resolution
9925 * is acceptable (in the case of UT; the TT is not at all critical
9926 * in this respect). The J2000 and MJD methods are good compromises
9927 * between resolution and convenience. For UT, the date & time
9928 * method is best matched to the algorithm that is used by the Earth
9929 * Rotation Angle function, called internally: maximum precision is
9930 * delivered when the uta argument is for 0hrs UT1 on the day in
9931 * question and the utb argument lies in the range 0 to 1, or vice
9932 * versa.
9933 *
9934 * <li> Both UT1 and TT are required, UT1 to predict the Earth rotation
9935 * and TT to predict the effects of precession-nutation. If UT1 is
9936 * used for both purposes, errors of order 100 microarcseconds
9937 * result.
9938 *
9939 * <li> This GAST is compatible with the IAU 2000 resolutions and must be
9940 * used only in conjunction with other IAU 2000 compatible
9941 * components such as precession-nutation.
9942 *
9943 * <li> The result is returned in the range 0 to 2pi.
9944 *
9945 * <li> The algorithm is from Capitaine et al. (2003) and IERS
9946 * Conventions 2003.
9947 *</ol>
9948 *<p>Called:<ul>
9949 * <li>{@link #jauGmst00} Greenwich mean sidereal time, IAU 2000
9950 * <li>{@link #jauEe00a} equation of the equinoxes, IAU 2000A
9951 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
9952 * </ul>
9953 *<p>References:
9954 *
9955 * <p>Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
9956 * implement the IAU 2000 definition of UT1", Astronomy &
9957 * Astrophysics, 406, 1135-1149 (2003)
9958 *
9959 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
9960 * IERS Technical Note No. 32, BKG (2004)
9961 *
9962 *@version 2008 May 16
9963 *
9964 * @since Release 20101201
9965 *
9966 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
9967 */
9968 public static double jauGst00a(double uta, double utb, double tta, double ttb)
9969 {
9970 double gmst00, ee00a, gst;
9971
9972
9973 gmst00 = jauGmst00(uta, utb, tta, ttb);
9974 ee00a = jauEe00a(tta, ttb);
9975 gst = jauAnp(gmst00 + ee00a);
9976
9977 return gst;
9978
9979 }
9980
9981
9982 /**
9983 * Greenwich apparent sidereal time (consistent with IAU 2000
9984 * resolutions but using the truncated nutation model IAU 2000B).
9985 *
9986 *<p>This function is derived from the International Astronomical Union's
9987 * SOFA (Standards Of Fundamental Astronomy) software collection.
9988 *
9989 *<p>Status: support function.
9990 *
9991 *<!-- Given: -->
9992 * @param uta double UT1 as a 2-part Julian Date (Notes 1,2)
9993 * @param utb double UT1 as a 2-part Julian Date (Notes 1,2)
9994 *
9995 * <!-- Returned (function value): -->
9996 * @return double Greenwich apparent sidereal time (radians)
9997 *
9998 * <p>Notes:
9999 * <ol>
10000 *
10001 * <li> The UT1 date uta+utb is a Julian Date, apportioned in any
10002 * convenient way between the argument pair. For example,
10003 * JD=2450123.7 could be expressed in any of these ways, among
10004 * others:
10005 *<pre>
10006 * uta utb
10007 *
10008 * 2450123.7 0.0 (JD method)
10009 * 2451545.0 -1421.3 (J2000 method)
10010 * 2400000.5 50123.2 (MJD method)
10011 * 2450123.5 0.2 (date & time method)
10012 *</pre>
10013 * The JD method is the most natural and convenient to use in cases
10014 * where the loss of several decimal digits of resolution is
10015 * acceptable. The J2000 and MJD methods are good compromises
10016 * between resolution and convenience. For UT, the date & time
10017 * method is best matched to the algorithm that is used by the Earth
10018 * Rotation Angle function, called internally: maximum precision is
10019 * delivered when the uta argument is for 0hrs UT1 on the day in
10020 * question and the utb argument lies in the range 0 to 1, or vice
10021 * versa.
10022 *
10023 * <li> The result is compatible with the IAU 2000 resolutions, except
10024 * that accuracy has been compromised for the sake of speed and
10025 * convenience in two respects:
10026 *
10027 * . UT is used instead of TDB (or TT) to compute the precession
10028 * component of GMST and the equation of the equinoxes. This
10029 * results in errors of order 0.1 mas at present.
10030 *
10031 * . The IAU 2000B abridged nutation model (McCarthy & Luzum, 2001)
10032 * is used, introducing errors of up to 1 mas.
10033 *
10034 * <li> This GAST is compatible with the IAU 2000 resolutions and must be
10035 * used only in conjunction with other IAU 2000 compatible
10036 * components such as precession-nutation.
10037 *
10038 * <li> The result is returned in the range 0 to 2pi.
10039 *
10040 * <li> The algorithm is from Capitaine et al. (2003) and IERS
10041 * Conventions 2003.
10042 *</ol>
10043 *<p>Called:<ul>
10044 * <li>{@link #jauGmst00} Greenwich mean sidereal time, IAU 2000
10045 * <li>{@link #jauEe00b} equation of the equinoxes, IAU 2000B
10046 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
10047 * </ul>
10048 *<p>References:
10049 *
10050 * <p>Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
10051 * implement the IAU 2000 definition of UT1", Astronomy &
10052 * Astrophysics, 406, 1135-1149 (2003)
10053 *
10054 * <p>McCarthy, D.D. & Luzum, B.J., "An abridged model of the
10055 * precession-nutation of the celestial pole", Celestial Mechanics &
10056 * Dynamical Astronomy, 85, 37-49 (2003)
10057 *
10058 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
10059 * IERS Technical Note No. 32, BKG (2004)
10060 *
10061 *@version 2008 May 16
10062 *
10063 * @since Release 20101201
10064 *
10065 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
10066 */
10067 public static double jauGst00b(double uta, double utb)
10068 {
10069 double gmst00, ee00b, gst;
10070
10071
10072 gmst00 = jauGmst00(uta, utb, uta, utb);
10073 ee00b = jauEe00b(uta, utb);
10074 gst = jauAnp(gmst00 + ee00b);
10075
10076 return gst;
10077
10078 }
10079
10080
10081 /**
10082 * Greenwich apparent sidereal time, IAU 2006, given the NPB matrix.
10083 *
10084 *<p>This function is derived from the International Astronomical Union's
10085 * SOFA (Standards Of Fundamental Astronomy) software collection.
10086 *
10087 *<p>Status: support function.
10088 *
10089 *<!-- Given: -->
10090 * @param uta double UT1 as a 2-part Julian Date (Notes 1,2)
10091 * @param utb double UT1 as a 2-part Julian Date (Notes 1,2)
10092 * @param tta double TT as a 2-part Julian Date (Notes 1,2)
10093 * @param ttb double TT as a 2-part Julian Date (Notes 1,2)
10094 * @param rnpb double[3][3] nutation x precession x bias matrix
10095 *
10096 * <!-- Returned (function value): -->
10097 * @return double Greenwich apparent sidereal time (radians)
10098 *
10099 * <p>Notes:
10100 * <ol>
10101 *
10102 * <li> The UT1 and TT dates uta+utb and tta+ttb respectively, are both
10103 * Julian Dates, apportioned in any convenient way between the
10104 * argument pairs. For example, JD=2450123.7 could be expressed in
10105 * any of these ways, among others:
10106 *<pre>
10107 * Part A Part B
10108 *
10109 * 2450123.7 0.0 (JD method)
10110 * 2451545.0 -1421.3 (J2000 method)
10111 * 2400000.5 50123.2 (MJD method)
10112 * 2450123.5 0.2 (date & time method)
10113 *</pre>
10114 * The JD method is the most natural and convenient to use in
10115 * cases where the loss of several decimal digits of resolution
10116 * is acceptable (in the case of UT; the TT is not at all critical
10117 * in this respect). The J2000 and MJD methods are good compromises
10118 * between resolution and convenience. For UT, the date & time
10119 * method is best matched to the algorithm that is used by the Earth
10120 * rotation angle function, called internally: maximum precision is
10121 * delivered when the uta argument is for 0hrs UT1 on the day in
10122 * question and the utb argument lies in the range 0 to 1, or vice
10123 * versa.
10124 *
10125 * <li> Both UT1 and TT are required, UT1 to predict the Earth rotation
10126 * and TT to predict the effects of precession-nutation. If UT1 is
10127 * used for both purposes, errors of order 100 microarcseconds
10128 * result.
10129 *
10130 * <li> Although the function uses the IAU 2006 series for s+XY/2, it is
10131 * otherwise independent of the precession-nutation model and can in
10132 * practice be used with any equinox-based NPB matrix.
10133 *
10134 * <li> The result is returned in the range 0 to 2pi.
10135 *</ol>
10136 *<p>Called:<ul>
10137 * <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
10138 * <li>{@link #jauS06} the CIO locator s, given X,Y, IAU 2006
10139 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
10140 * <li>{@link #jauEra00} Earth rotation angle, IAU 2000
10141 * <li>{@link #jauEors} equation of the origins, given NPB matrix and s
10142 * </ul>
10143 *<p>Reference:
10144 *
10145 * <p>Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981
10146 *
10147 *@version 2008 May 24
10148 *
10149 * @since Release 20101201
10150 *
10151 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
10152 */
10153 public static double jauGst06(double uta, double utb, double tta, double ttb,
10154 double rnpb[][])
10155 {
10156 double s, era, eors, gst;
10157
10158
10159 /* Extract CIP coordinates. */
10160 CelestialIntermediatePole cip = jauBpn2xy(rnpb);
10161
10162 /* The CIO locator, s. */
10163 s = jauS06(tta, ttb, cip.x, cip.y);
10164
10165 /* Greenwich apparent sidereal time. */
10166 era = jauEra00(uta, utb);
10167 eors = jauEors(rnpb, s);
10168 gst = jauAnp(era - eors);
10169
10170 return gst;
10171
10172 }
10173
10174
10175 /**
10176 * Greenwich apparent sidereal time (consistent with IAU 2000 and 2006
10177 * resolutions).
10178 *
10179 *<p>This function is derived from the International Astronomical Union's
10180 * SOFA (Standards Of Fundamental Astronomy) software collection.
10181 *
10182 *<p>Status: canonical model.
10183 *
10184 *<!-- Given: -->
10185 * @param uta double UT1 as a 2-part Julian Date (Notes 1,2)
10186 * @param utb double UT1 as a 2-part Julian Date (Notes 1,2)
10187 * @param tta double TT as a 2-part Julian Date (Notes 1,2)
10188 * @param ttb double TT as a 2-part Julian Date (Notes 1,2)
10189 *
10190 * <!-- Returned (function value): -->
10191 * @return double Greenwich apparent sidereal time (radians)
10192 *
10193 * <p>Notes:
10194 * <ol>
10195 *
10196 * <li> The UT1 and TT dates uta+utb and tta+ttb respectively, are both
10197 * Julian Dates, apportioned in any convenient way between the
10198 * argument pairs. For example, JD=2450123.7 could be expressed in
10199 * any of these ways, among others:
10200 *<pre>
10201 * Part A Part B
10202 *
10203 * 2450123.7 0.0 (JD method)
10204 * 2451545.0 -1421.3 (J2000 method)
10205 * 2400000.5 50123.2 (MJD method)
10206 * 2450123.5 0.2 (date & time method)
10207 *</pre>
10208 * The JD method is the most natural and convenient to use in
10209 * cases where the loss of several decimal digits of resolution
10210 * is acceptable (in the case of UT; the TT is not at all critical
10211 * in this respect). The J2000 and MJD methods are good compromises
10212 * between resolution and convenience. For UT, the date & time
10213 * method is best matched to the algorithm that is used by the Earth
10214 * rotation angle function, called internally: maximum precision is
10215 * delivered when the uta argument is for 0hrs UT1 on the day in
10216 * question and the utb argument lies in the range 0 to 1, or vice
10217 * versa.
10218 *
10219 * <li> Both UT1 and TT are required, UT1 to predict the Earth rotation
10220 * and TT to predict the effects of precession-nutation. If UT1 is
10221 * used for both purposes, errors of order 100 microarcseconds
10222 * result.
10223 *
10224 * <li> This GAST is compatible with the IAU 2000/2006 resolutions and
10225 * must be used only in conjunction with IAU 2006 precession and
10226 * IAU 2000A nutation.
10227 *
10228 * <li> The result is returned in the range 0 to 2pi.
10229 *</ol>
10230 *<p>Called:<ul>
10231 * <li>{@link #jauPnm06a} classical NPB matrix, IAU 2006/2000A
10232 * <li>{@link #jauGst06} Greenwich apparent ST, IAU 2006, given NPB matrix
10233 * </ul>
10234 *<p>Reference:
10235 *
10236 * <p>Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981
10237 *
10238 *@version 2008 May 16
10239 *
10240 * @since Release 20101201
10241 *
10242 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
10243 */
10244 public static double jauGst06a(double uta, double utb, double tta, double ttb)
10245 {
10246 double rnpb[][] = new double[3][3], gst;
10247
10248
10249 /* Classical nutation x precession x bias matrix, IAU 2000A. */
10250 rnpb = jauPnm06a(tta, ttb);
10251
10252 /* Greenwich apparent sidereal time. */
10253 gst = jauGst06(uta, utb, tta, ttb, rnpb);
10254
10255 return gst;
10256
10257 }
10258
10259
10260 /**
10261 * Greenwich apparent sidereal time (consistent with IAU 1982/94
10262 * resolutions).
10263 *
10264 *<p>This function is derived from the International Astronomical Union's
10265 * SOFA (Standards Of Fundamental Astronomy) software collection.
10266 *
10267 *<p>Status: support function.
10268 *
10269 *<!-- Given: -->
10270 * @param uta double UT1 as a 2-part Julian Date (Notes 1,2)
10271 * @param utb double UT1 as a 2-part Julian Date (Notes 1,2)
10272 *
10273 * <!-- Returned (function value): -->
10274 * @return double Greenwich apparent sidereal time (radians)
10275 *
10276 * <p>Notes:
10277 * <ol>
10278 *
10279 * <li> The UT1 date uta+utb is a Julian Date, apportioned in any
10280 * convenient way between the argument pair. For example,
10281 * JD=2450123.7 could be expressed in any of these ways, among
10282 * others:
10283 *<pre>
10284 * uta utb
10285 *
10286 * 2450123.7 0.0 (JD method)
10287 * 2451545.0 -1421.3 (J2000 method)
10288 * 2400000.5 50123.2 (MJD method)
10289 * 2450123.5 0.2 (date & time method)
10290 *</pre>
10291 * The JD method is the most natural and convenient to use in cases
10292 * where the loss of several decimal digits of resolution is
10293 * acceptable. The J2000 and MJD methods are good compromises
10294 * between resolution and convenience. For UT, the date & time
10295 * method is best matched to the algorithm that is used by the Earth
10296 * Rotation Angle function, called internally: maximum precision is
10297 * delivered when the uta argument is for 0hrs UT1 on the day in
10298 * question and the utb argument lies in the range 0 to 1, or vice
10299 * versa.
10300 *
10301 * <li> The result is compatible with the IAU 1982 and 1994 resolutions,
10302 * except that accuracy has been compromised for the sake of
10303 * convenience in that UT is used instead of TDB (or TT) to compute
10304 * the equation of the equinoxes.
10305 *
10306 * <li> This GAST must be used only in conjunction with contemporaneous
10307 * IAU standards such as 1976 precession, 1980 obliquity and 1982
10308 * nutation. It is not compatible with the IAU 2000 resolutions.
10309 *
10310 * <li> The result is returned in the range 0 to 2pi.
10311 *</ol>
10312 *<p>Called:<ul>
10313 * <li>{@link #jauGmst82} Greenwich mean sidereal time, IAU 1982
10314 * <li>{@link #jauEqeq94} equation of the equinoxes, IAU 1994
10315 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
10316 * </ul>
10317 *<p>References:
10318 *
10319 * <p>Explanatory Supplement to the Astronomical Almanac,
10320 * P. Kenneth Seidelmann (ed), University Science Books (1992)
10321 *
10322 * IAU Resolution C7, Recommendation 3 (1994)
10323 *
10324 *@version 2008 May 16
10325 *
10326 * @since Release 20101201
10327 *
10328 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
10329 */
10330 public static double jauGst94(double uta, double utb)
10331 {
10332 double gmst82, eqeq94, gst;
10333
10334
10335 gmst82 = jauGmst82(uta, utb);
10336 eqeq94 = jauEqeq94(uta, utb);
10337 gst = jauAnp(gmst82 + eqeq94);
10338
10339 return gst;
10340
10341 }
10342
10343
10344 /**
10345 * Transform Hipparcos star data into the FK5 (J2000.0) system.
10346 *
10347 *<p>This function is derived from the International Astronomical Union's
10348 * SOFA (Standards Of Fundamental Astronomy) software collection.
10349 *
10350 *<p>Status: support function.
10351 *
10352 * Given (all Hipparcos, epoch J2000.0):
10353 * @param rh double RA (radians)
10354 * @param dh double Dec (radians)
10355 * @param drh double proper motion in RA (dRA/dt, rad/Jyear)
10356 * @param ddh double proper motion in Dec (dDec/dt, rad/Jyear)
10357 * @param pxh double parallax (arcsec)
10358 * @param rvh double radial velocity (km/s, positive = receding)
10359 *
10360 * @return (all FK5, equinox J2000.0, epoch J2000.0):
10361 *
10362 * <p>Notes:
10363 * <ol>
10364 *
10365 * <li> This function transforms Hipparcos star positions and proper
10366 * motions into FK5 J2000.0.
10367 *
10368 * <li> The proper motions in RA are dRA/dt rather than
10369 * cos(Dec)*dRA/dt, and are per year rather than per century.
10370 *
10371 * <li> The FK5 to Hipparcos transformation is modeled as a pure
10372 * rotation and spin; zonal errors in the FK5 catalog are not
10373 * taken into account.
10374 *
10375 * <li> See also jauFk52h, jauFk5hz, jauHfk5z.
10376 *</ol>
10377 *<p>Called:<ul>
10378 * <li>{@link #jauStarpv} star catalog data to space motion pv-vector
10379 * <li>{@link #jauFk5hip} FK5 to Hipparcos rotation and spin
10380 * <li>{@link #jauRv2m} r-vector to r-matrix
10381 * <li>{@link #jauRxp} product of r-matrix and p-vector
10382 * <li>{@link #jauTrxp} product of transpose of r-matrix and p-vector
10383 * <li>{@link #jauPxp} vector product of two p-vectors
10384 * <li>{@link #jauPmp} p-vector minus p-vector
10385 * <li>{@link #jauPvstar} space motion pv-vector to star catalog data
10386 * </ul>
10387 *<p>Reference:
10388 *
10389 * <p>F.Mignard & M.Froeschle, Astron. Astrophys. 354, 732-739 (2000).
10390 *
10391 *@version 2009 December 17
10392 *
10393 * @since Release 20101201
10394 *
10395 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
10396 */
10397 public static CatalogCoords jauH2fk5(double rh, double dh,
10398 double drh, double ddh, double pxh, double rvh)
10399 {
10400 int i;
10401 double pvh[][] = new double[2][3], r5h[][] = new double[3][3], s5h[] = new double[3], sh[] = new double[3], wxp[] = new double[3], vv[] = new double[3], pv5[][] = new double[2][3];
10402
10403
10404 /* Hipparcos barycentric position/velocity pv-vector (normalized). */
10405 jauStarpv(rh, dh, drh, ddh, pxh, rvh, pvh);
10406
10407 /* FK5 to Hipparcos orientation matrix and spin vector. */
10408 jauFk5hip(r5h, s5h);
10409
10410 /* Make spin units per day instead of per year. */
10411 for ( i = 0; i < 3; s5h[i++] /= 365.25 );
10412
10413 /* Orient the spin into the Hipparcos system. */
10414 sh = jauRxp(r5h, s5h);
10415
10416 /* De-orient the Hipparcos position into the FK5 system. */
10417 pv5[0] = jauTrxp(r5h, pvh[0]);
10418
10419 /* Apply spin to the position giving an extra space motion component. */
10420 wxp = jauPxp(pvh[0],sh);
10421
10422 /* Subtract this component from the Hipparcos space motion. */
10423 vv = jauPmp(pvh[1], wxp);
10424
10425 /* De-orient the Hipparcos space motion into the FK5 system. */
10426 pv5[1] = jauTrxp(r5h, vv);
10427
10428 /* FK5 pv-vector to spherical., r5, d5, dr5, dd5, px5, rv5 */
10429 CatalogCoords cat = null;
10430 try {
10431 cat = jauPvstar(pv5);
10432 } catch (JSOFAInternalError e) {
10433 // original code just ignored this possibility
10434 e.printStackTrace();
10435 }
10436
10437 return cat;
10438
10439 }
10440
10441
10442 /**
10443 * Transform a Hipparcos star position into FK5 J2000.0, assuming
10444 * zero Hipparcos proper motion.
10445 *
10446 *<p>This function is derived from the International Astronomical Union's
10447 * SOFA (Standards Of Fundamental Astronomy) software collection.
10448 *
10449 *<p>Status: support function.
10450 *
10451 *<!-- Given: -->
10452 * @param rh double Hipparcos RA (radians)
10453 * @param dh double Hipparcos Dec (radians)
10454 * @param date1 double TDB date (Note 1)
10455 * @param date2 double TDB date (Note 1)
10456 *
10457 * FIXME original did not return the parallax and radial velocity of the CatalogCoords type.
10458 * Returned (all FK5, equinox J2000.0, date date1+date2):
10459 * r5 double RA (radians)
10460 * d5 double Dec (radians)
10461 * dr5 double FK5 RA proper motion (rad/year, Note 4)
10462 * dd5 double Dec proper motion (rad/year, Note 4)
10463 *
10464 * <p>Notes:
10465 * <ol>
10466 *
10467 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
10468 * convenient way between the two arguments. For example,
10469 * JD(TT)=2450123.7 could be expressed in any of these ways,
10470 * among others:
10471 *<pre>
10472 * date1 date2
10473 *
10474 * 2450123.7 0.0 (JD method)
10475 * 2451545.0 -1421.3 (J2000 method)
10476 * 2400000.5 50123.2 (MJD method)
10477 * 2450123.5 0.2 (date & time method)
10478 *</pre>
10479 * The JD method is the most natural and convenient to use in
10480 * cases where the loss of several decimal digits of resolution
10481 * is acceptable. The J2000 method is best matched to the way
10482 * the argument is handled internally and will deliver the
10483 * optimum resolution. The MJD method and the date & time methods
10484 * are both good compromises between resolution and convenience.
10485 *
10486 * <li> The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
10487 *
10488 * <li> The FK5 to Hipparcos transformation is modeled as a pure rotation
10489 * and spin; zonal errors in the FK5 catalogue are not taken into
10490 * account.
10491 *
10492 * <li> It was the intention that Hipparcos should be a close
10493 * approximation to an inertial frame, so that distant objects have
10494 * zero proper motion; such objects have (in general) non-zero
10495 * proper motion in FK5, and this function returns those fictitious
10496 * proper motions.
10497 *
10498 * <li> The position returned by this function is in the FK5 J2000.0
10499 * reference system but at date date1+date2.
10500 *
10501 * <li> See also jauFk52h, jauH2fk5, jauFk5zhz.
10502 *</ol>
10503 *<p>Called:<ul>
10504 * <li>{@link #jauS2c} spherical coordinates to unit vector
10505 * <li>{@link #jauFk5hip} FK5 to Hipparcos rotation and spin
10506 * <li>{@link #jauRxp} product of r-matrix and p-vector
10507 * <li>{@link #jauSxp} multiply p-vector by scalar
10508 * <li>{@link #jauRxr} product of two r-matrices
10509 * <li>{@link #jauTrxp} product of transpose of r-matrix and p-vector
10510 * <li>{@link #jauPxp} vector product of two p-vectors
10511 * <li>{@link #jauPv2s} pv-vector to spherical
10512 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
10513 * </ul>
10514 *<p>Reference:
10515 *
10516 * <p>F.Mignard & M.Froeschle, 2000, Astron.Astrophys. 354, 732-739.
10517 *
10518 *@version 2009 December 17
10519 *
10520 * @since Release 20101201
10521 *
10522 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
10523 *
10524 */
10525 public static CatalogCoords jauHfk5z(double rh, double dh, double date1, double date2)
10526 {
10527 double t, ph[] = new double[3], r5h[][] = new double[3][3], s5h[] = new double[3], sh[] = new double[3], vst[] = new double[3],
10528 rst[][] = new double[3][3], r5ht[][] = new double[3][3], pv5e[][] = new double[2][3], vv[] = new double[3];
10529
10530
10531 /* Time interval from fundamental epoch J2000.0 to given date (JY). */
10532 t = ((date1 - DJ00) + date2) / DJY;
10533
10534 /* Hipparcos barycentric position vector (normalized). */
10535 ph = jauS2c(rh,dh);
10536
10537 /* FK5 to Hipparcos orientation matrix and spin vector. */
10538 jauFk5hip(r5h, s5h);
10539
10540 /* Rotate the spin into the Hipparcos system. */
10541 sh = jauRxp(r5h, s5h);
10542
10543 /* Accumulated Hipparcos wrt FK5 spin over that interval. */
10544 vst = jauSxp(t,s5h);
10545
10546 /* Express the accumulated spin as a rotation matrix. */
10547 rst = jauRv2m(vst);
10548
10549 /* Rotation matrix: accumulated spin, then FK5 to Hipparcos. */
10550 r5ht = jauRxr(r5h, rst);
10551
10552 /* De-orient & de-spin the Hipparcos position into FK5 J2000.0. */
10553 pv5e[0] = jauTrxp(r5ht, ph);
10554
10555 /* Apply spin to the position giving a space motion. */
10556 vv = jauPxp(sh,ph);
10557
10558 /* De-orient & de-spin the Hipparcos space motion into FK5 J2000.0. */
10559 pv5e[1] = jauTrxp(r5ht, vv);
10560
10561 /* FK5 position/velocity pv-vector to spherical. */
10562 SphericalPositionVelocity pvs = jauPv2s(pv5e);
10563 double r5 = jauAnp(pvs.pos.theta);
10564
10565 return new CatalogCoords(r5, pvs.pos.phi, pvs.vel.theta, pvs.vel.phi, 0.0, 0.0);
10566
10567 }
10568
10569
10570 /**
10571 * Initialize an r-matrix to the identity matrix.
10572 *
10573 *<p>This function is derived from the International Astronomical Union's
10574 * SOFA (Standards Of Fundamental Astronomy) software collection.
10575 *
10576 *<p>Status: vector/matrix support function.
10577 *
10578 *<!-- Returned: -->
10579 * @param r double[3][3] <u>returned</u> r-matrix
10580 *
10581 *<p>Called:<ul>
10582 * <li>{@link #jauZr} zero r-matrix
10583 * </ul>
10584 *@version 2008 May 11
10585 *
10586 * @since Release 20101201
10587 *
10588 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
10589 */
10590 public static void jauIr(double r[][])
10591 {
10592 jauZr(r);
10593 r[0][0] = 1.0;
10594 r[1][1] = 1.0;
10595 r[2][2] = 1.0;
10596
10597 return;
10598
10599 }
10600
10601
10602 /**
10603 * Julian Date to Gregorian year, month, day, and fraction of a day.
10604 *
10605 *<p>This function is derived from the International Astronomical Union's
10606 * SOFA (Standards Of Fundamental Astronomy) software collection.
10607 *
10608 *<p>Status: support function.
10609 *
10610 *<!-- Given: -->
10611 * @param dj1 double Julian Date (Notes 1, 2)
10612 * @param dj2 double Julian Date (Notes 1, 2)
10613 *
10614 * Returned (arguments):
10615 * iy int year
10616 * im int month
10617 * id int day
10618 * fd double fraction of day
10619 *
10620 * <!-- Returned (function value): -->
10621 * @return int status:
10622 * 0 = OK
10623 * -1 = unacceptable date (Note 3)
10624 *
10625 * <p>Notes:
10626 * <ol>
10627 *
10628 * <li> The earliest valid date is -68569.5 (-4900 March 1). The
10629 * largest value accepted is 10^9.
10630 *
10631 * <li> The Julian Date is apportioned in any convenient way between
10632 * the arguments dj1 and dj2. For example, JD=2450123.7 could
10633 * be expressed in any of these ways, among others:
10634 *<pre>
10635 * dj1 dj2
10636 *
10637 * 2450123.7 0.0 (JD method)
10638 * 2451545.0 -1421.3 (J2000 method)
10639 * 2400000.5 50123.2 (MJD method)
10640 * 2450123.5 0.2 (date & time method)
10641 *</pre>
10642 * Separating integer and fraction uses the "compensated summation"
10643 * algorithm of Kahan-Neumaier to preserve as much precision as
10644 * possible irrespective of the jd1+jd2 apportionment.
10645 *
10646 * <li> In early eras the conversion is from the "proleptic Gregorian
10647 * calendar"; no account is taken of the date(s) of adoption of
10648 * the Gregorian calendar, nor is the AD/BC numbering convention
10649 * observed.
10650 *</ol>
10651 *<p>Reference:
10652 *
10653 * <p>Explanatory Supplement to the Astronomical Almanac,
10654 * P. Kenneth Seidelmann (ed), University Science Books (1992),
10655 * Section 12.92 (p604).
10656 * <p> Klein, A., A Generalized Kahan-Babuska-Summation-Algorithm.
10657 * Computing 76, 279-293 (2006), Section 3.
10658 *
10659 * @version 2020 Nov 13
10660 *
10661 * @since Release 20101201
10662 *
10663 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
10664 */
10665 public static Calendar jauJd2cal(double dj1, double dj2) throws JSOFAIllegalParameter
10666 {
10667 /* Minimum and maximum allowed JD */
10668 final double djmin = -68569.5;
10669 final double djmax = 1e9;
10670
10671 long jd, i , l, n, k;
10672 double dj, f1, f2, d, s, cs, v[]=new double[2], x, t, f;
10673
10674
10675 /* Verify date is acceptable. */
10676 dj = dj1 + dj2;
10677 if (dj < djmin || dj > djmax) throw new JSOFAIllegalParameter("input julian date out of range", -1);
10678
10679 /* Separate day and fraction (where -0.5 <= fraction < 0.5). */
10680 d = dnint(dj1);
10681 f1 = dj1 - d;
10682 jd = (long) d;
10683 d = dnint(dj2);
10684 f2 = dj2 - d;
10685 jd += (long) d;
10686
10687 /* Compute f1+f2+0.5 using compensated summation (Klein 2006). */
10688 s = 0.5;
10689 cs = 0.0;
10690 v[0] = f1;
10691 v[1] = f2;
10692 for ( int i1 = 0; i1 < 2; i1++ ) {
10693 x = v[i1];
10694 t = s + x;
10695 cs += abs(s) >= abs(x) ? (s-t) + x : (x-t) + s;
10696 s = t;
10697 if ( s >= 1.0 ) {
10698 jd++;
10699 s -= 1.0;
10700 }
10701 }
10702 f = s + cs;
10703 cs = f - s;
10704
10705 /* Deal with negative f. */
10706 if ( f < 0.0 ) {
10707
10708 /* Compensated summation: assume that |s| <= 1.0. */
10709 f = s + 1.0;
10710 cs += (1.0-f) + s;
10711 s = f;
10712 f = s + cs;
10713 cs = f - s;
10714 jd--;
10715 }
10716
10717 /* Deal with f that is 1.0 or more (when rounded to double). */
10718 if ( (f-1.0) >= -DBL_EPSILON/4.0 ) {
10719
10720 /* Compensated summation: assume that |s| <= 1.0. */
10721 t = s - 1.0;
10722 cs += (s-t) - 1.0;
10723 s = t;
10724 f = s + cs;
10725 if ( -DBL_EPSILON/2.0 < f ) {
10726 jd++;
10727 f = gmax(f, 0.0);
10728 }
10729 }
10730
10731 /* Express day in Gregorian calendar. */
10732 l = jd + 68569L;
10733 n = (4L * l) / 146097L;
10734 l -= (146097L * n + 3L) / 4L;
10735 i = (4000L * (l + 1L)) / 1461001L;
10736 l -= (1461L * i) / 4L - 31L;
10737 k = (80L * l) / 2447L;
10738 int id = (int) (l - (2447L * k) / 80L);
10739 l = k / 11L;
10740 int im = (int) (k + 2L - 12L * l);
10741 int iy = (int) (100L * (n - 49L) + i + l);
10742
10743
10744 return new Calendar(iy, im, id, f);
10745
10746 }
10747
10748 /**
10749 * larger (most +ve) of two numbers (generic).
10750 * @param A
10751 * @param B
10752 * @return
10753 */
10754 private static double gmax(double A, double B) {
10755 return (((A)>(B))?(A):(B)) ;
10756 }
10757
10758 /**
10759 * Julian Date to Gregorian Calendar, expressed in a form convenient
10760 * for formatting messages: rounded to a specified precision.
10761 *
10762 *<p>This function is derived from the International Astronomical Union's
10763 * SOFA (Standards Of Fundamental Astronomy) software collection.
10764 *
10765 *<p>Status: support function.
10766 *
10767 *<!-- Given: -->
10768 * @param ndp int number of decimal places of days in fraction
10769 * @param dj1 double dj1+dj2 = Julian Date (Note 1)
10770 * @param dj2 double dj1+dj2 = Julian Date (Note 1)
10771 *
10772 *<!-- Returned: -->
10773 * @param iymdf int[4] <u>returned</u> year, month, day, fraction in Gregorian calendar
10774 *
10775 *
10776 * <!-- Returned (function value): -->
10777 * @return int status:
10778 * -1 = date out of range
10779 * 0 = OK
10780 * +1 = NDP not 0-9 (interpreted as 0)
10781 *
10782 * <p>Notes:
10783 * <ol>
10784 *
10785 * <li> The Julian Date is apportioned in any convenient way between
10786 * the arguments dj1 and dj2. For example, JD=2450123.7 could
10787 * be expressed in any of these ways, among others:
10788 *<pre>
10789 * dj1 dj2
10790 *
10791 * 2450123.7 0.0 (JD method)
10792 * 2451545.0 -1421.3 (J2000 method)
10793 * 2400000.5 50123.2 (MJD method)
10794 * 2450123.5 0.2 (date & time method)
10795 *</pre>
10796 * <li> In early eras the conversion is from the "Proleptic Gregorian
10797 * Calendar"; no account is taken of the date(s) of adoption of
10798 * the Gregorian Calendar, nor is the AD/BC numbering convention
10799 * observed.
10800 *
10801 * <li> Refer to the function jauJd2cal.
10802 *
10803 * <li> NDP should be 4 or less if internal overflows are to be
10804 * avoided on machines which use 16-bit integers.
10805 *</ol>
10806 *<p>Called:<ul>
10807 * <li>{@link #jauJd2cal} JD to Gregorian calendar
10808 * </ul>
10809 *<p>Reference:
10810 *
10811 * <p>Explanatory Supplement to the Astronomical Almanac,
10812 * P. Kenneth Seidelmann (ed), University Science Books (1992),
10813 * Section 12.92 (p604).
10814 *
10815 * @version 2020 Nov 13
10816 *
10817 * @since Release 20101201
10818 *
10819 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
10820 */
10821 public static int jauJdcalf(int ndp, double dj1, double dj2, int iymdf[])
10822 {
10823 int j;
10824 double denom, d1, d2, f1, f2, d, djd, f, rf;
10825
10826
10827 /* Denominator of fraction (e.g. 100 for 2 decimal places). */
10828 if ((ndp >= 0) && (ndp <= 9)) {
10829 j = 0;
10830 denom = pow(10.0, ndp);
10831 } else {
10832 j = 1;
10833 denom = 1.0;
10834 }
10835
10836 /* Copy the date, big then small. */
10837 if (abs(dj1) >= abs(dj2)) {
10838 d1 = dj1;
10839 d2 = dj2;
10840 } else {
10841 d1 = dj2;
10842 d2 = dj1;
10843 }
10844
10845 /* Realign to midnight (without rounding error). */
10846 d1 -= 0.5;
10847
10848 /* Separate day and fraction (as precisely as possible). */
10849 d = dnint(d1);
10850 f1 = d1 - d;
10851 djd = d;
10852 d = dnint(d2);
10853 f2 = d2 - d;
10854 djd += d;
10855 d = dnint(f1 + f2);
10856 f = (f1 - d) + f2;
10857 if (f < 0.0) {
10858 f += 1.0;
10859 d -= 1.0;
10860 }
10861 djd += d;
10862
10863 /* Round the total fraction to the specified number of places. */
10864 rf = dnint(f*denom) / denom;
10865
10866 /* Re-align to noon. */
10867 djd += 0.5;
10868
10869 /* Convert to Gregorian Calendar. */
10870 try {
10871 Calendar cal = jauJd2cal(djd, rf);
10872 iymdf[0] = cal.iy;
10873 iymdf[1] = cal.im;
10874 iymdf[2] = cal.id;
10875 iymdf[3] = (int) dnint(cal.fd * denom);
10876 } catch (JSOFAIllegalParameter e) {
10877 j = -1;
10878 }
10879
10880 /* Return the status. */
10881 return j;
10882
10883 }
10884
10885
10886 /**
10887 * Form the matrix of nutation for a given date, IAU 2000A model.
10888 *
10889 *<p>This function is derived from the International Astronomical Union's
10890 * SOFA (Standards Of Fundamental Astronomy) software collection.
10891 *
10892 *<p>Status: support function.
10893 *
10894 *<!-- Given: -->
10895 * @param date1 double TT as a 2-part Julian Date (Note 1)
10896 * @param date2 double TT as a 2-part Julian Date (Note 1)
10897 *
10898 *<!-- Returned: -->
10899 * @return rmatn double[3][3] <u>returned</u> nutation matrix
10900 *
10901 * <p>Notes:
10902 * <ol>
10903 *
10904 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
10905 * convenient way between the two arguments. For example,
10906 * JD(TT)=2450123.7 could be expressed in any of these ways,
10907 * among others:
10908 *<pre>
10909 * date1 date2
10910 *
10911 * 2450123.7 0.0 (JD method)
10912 * 2451545.0 -1421.3 (J2000 method)
10913 * 2400000.5 50123.2 (MJD method)
10914 * 2450123.5 0.2 (date & time method)
10915 *</pre>
10916 * The JD method is the most natural and convenient to use in
10917 * cases where the loss of several decimal digits of resolution
10918 * is acceptable. The J2000 method is best matched to the way
10919 * the argument is handled internally and will deliver the
10920 * optimum resolution. The MJD method and the date & time methods
10921 * are both good compromises between resolution and convenience.
10922 *
10923 * <li> The matrix operates in the sense V(true) = rmatn * V(mean), where
10924 * the p-vector V(true) is with respect to the true equatorial triad
10925 * of date and the p-vector V(mean) is with respect to the mean
10926 * equatorial triad of date.
10927 *
10928 * <li> A faster, but slightly less accurate result (about 1 mas), can be
10929 * obtained by using instead the jauNum00b function.
10930 *</ol>
10931 *<p>Called:<ul>
10932 * <li>{@link #jauPn00a} bias/precession/nutation, IAU 2000A
10933 * </ul>
10934 *<p>Reference:
10935 *
10936 * <p>Explanatory Supplement to the Astronomical Almanac,
10937 * P. Kenneth Seidelmann (ed), University Science Books (1992),
10938 * Section 3.222-3 (p114).
10939 *
10940 *@version 2008 May 12
10941 *
10942 * @since Release 20101201
10943 *
10944 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
10945 */
10946 public static double[][] jauNum00a(double date1, double date2)
10947 {
10948
10949 /* Obtain the required matrix (discarding other results). */
10950 PrecessionNutation pn = jauPn00a(date1, date2);
10951
10952 return pn.rn ;
10953
10954 }
10955
10956
10957 /**
10958 * Form the matrix of nutation for a given date, IAU 2000B model.
10959 *
10960 *<p>This function is derived from the International Astronomical Union's
10961 * SOFA (Standards Of Fundamental Astronomy) software collection.
10962 *
10963 *<p>Status: support function.
10964 *
10965 *<!-- Given: -->
10966 * @param date1 double TT as a 2-part Julian Date (Note 1)
10967 * @param date2 double TT as a 2-part Julian Date (Note 1)
10968 *
10969 *<!-- Returned: -->
10970 * @return rmatn double[3][3] <u>returned</u> nutation matrix
10971 *
10972 * <p>Notes:
10973 * <ol>
10974 *
10975 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
10976 * convenient way between the two arguments. For example,
10977 * JD(TT)=2450123.7 could be expressed in any of these ways,
10978 * among others:
10979 *<pre>
10980 * date1 date2
10981 *
10982 * 2450123.7 0.0 (JD method)
10983 * 2451545.0 -1421.3 (J2000 method)
10984 * 2400000.5 50123.2 (MJD method)
10985 * 2450123.5 0.2 (date & time method)
10986 *</pre>
10987 * The JD method is the most natural and convenient to use in
10988 * cases where the loss of several decimal digits of resolution
10989 * is acceptable. The J2000 method is best matched to the way
10990 * the argument is handled internally and will deliver the
10991 * optimum resolution. The MJD method and the date & time methods
10992 * are both good compromises between resolution and convenience.
10993 *
10994 * <li> The matrix operates in the sense V(true) = rmatn * V(mean), where
10995 * the p-vector V(true) is with respect to the true equatorial triad
10996 * of date and the p-vector V(mean) is with respect to the mean
10997 * equatorial triad of date.
10998 *
10999 * <li> The present function is faster, but slightly less accurate (about
11000 * 1 mas), than the jauNum00a function.
11001 *</ol>
11002 *<p>Called:<ul>
11003 * <li>{@link #jauPn00b} bias/precession/nutation, IAU 2000B
11004 * </ul>
11005 *<p>Reference:
11006 *
11007 * <p>Explanatory Supplement to the Astronomical Almanac,
11008 * P. Kenneth Seidelmann (ed), University Science Books (1992),
11009 * Section 3.222-3 (p114).
11010 *
11011 *@version 2008 May 12
11012 *
11013 * @since Release 20101201
11014 *
11015 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
11016 */
11017 public static double[][] jauNum00b(double date1, double date2)
11018 {
11019
11020 /* Obtain the required matrix (discarding other results). */
11021 PrecessionNutation pn = jauPn00b(date1, date2);
11022
11023 return pn.rn;
11024
11025 }
11026
11027
11028 /**
11029 * Form the matrix of nutation for a given date, IAU 2006/2000A model.
11030 *
11031 *<p>This function is derived from the International Astronomical Union's
11032 * SOFA (Standards Of Fundamental Astronomy) software collection.
11033 *
11034 *<p>Status: support function.
11035 *
11036 *<!-- Given: -->
11037 * @param date1 double TT as a 2-part Julian Date (Note 1)
11038 * @param date2 double TT as a 2-part Julian Date (Note 1)
11039 *
11040 *<!-- Returned: -->
11041 * @return rmatn double[3][3] <u>returned</u> nutation matrix
11042 *
11043 * <p>Notes:
11044 * <ol>
11045 *
11046 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
11047 * convenient way between the two arguments. For example,
11048 * JD(TT)=2450123.7 could be expressed in any of these ways,
11049 * among others:
11050 *<pre>
11051 * date1 date2
11052 *
11053 * 2450123.7 0.0 (JD method)
11054 * 2451545.0 -1421.3 (J2000 method)
11055 * 2400000.5 50123.2 (MJD method)
11056 * 2450123.5 0.2 (date & time method)
11057 *</pre>
11058 * The JD method is the most natural and convenient to use in
11059 * cases where the loss of several decimal digits of resolution
11060 * is acceptable. The J2000 method is best matched to the way
11061 * the argument is handled internally and will deliver the
11062 * optimum resolution. The MJD method and the date & time methods
11063 * are both good compromises between resolution and convenience.
11064 *
11065 * <li> The matrix operates in the sense V(true) = rmatn * V(mean), where
11066 * the p-vector V(true) is with respect to the true equatorial triad
11067 * of date and the p-vector V(mean) is with respect to the mean
11068 * equatorial triad of date.
11069 *</ol>
11070 *<p>Called:<ul>
11071 * <li>{@link #jauObl06} mean obliquity, IAU 2006
11072 * <li>{@link #jauNut06a} nutation, IAU 2006/2000A
11073 * <li>{@link #jauNumat} form nutation matrix
11074 * </ul>
11075 *<p>Reference:
11076 *
11077 * <p>Explanatory Supplement to the Astronomical Almanac,
11078 * P. Kenneth Seidelmann (ed), University Science Books (1992),
11079 * Section 3.222-3 (p114).
11080 *
11081 *@version 2008 May 12
11082 *
11083 * @since Release 20101201
11084 *
11085 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
11086 */
11087 public static double[][] jauNum06a(double date1, double date2)
11088 {
11089 double eps, rmatn[][];
11090
11091
11092 /* Mean obliquity. */
11093 eps = jauObl06(date1, date2);
11094
11095 /* Nutation components. */
11096 NutationTerms nut = jauNut06a(date1, date2);
11097
11098 /* Nutation matrix. */
11099 rmatn = jauNumat(eps, nut.dpsi, nut.deps);
11100
11101 return rmatn;
11102
11103 }
11104
11105
11106 /**
11107 * Form the matrix of nutation.
11108 *
11109 *<p>This function is derived from the International Astronomical Union's
11110 * SOFA (Standards Of Fundamental Astronomy) software collection.
11111 *
11112 *<p>Status: support function.
11113 *
11114 *<!-- Given: -->
11115 * @param epsa double mean obliquity of date (Note 1)
11116 * @param dpsi double nutation (Note 2)
11117 * @param deps double nutation (Note 2)
11118 *
11119 *<!-- Returned: -->
11120 * @return rmatn double[3][3] <u>returned</u> nutation matrix (Note 3)
11121 *
11122 * <p>Notes:
11123 * <ol>
11124 *
11125 *
11126 * <li> The supplied mean obliquity epsa, must be consistent with the
11127 * precession-nutation models from which dpsi and deps were obtained.
11128 *
11129 * <li> The caller is responsible for providing the nutation components;
11130 * they are in longitude and obliquity, in radians and are with
11131 * respect to the equinox and ecliptic of date.
11132 *
11133 * <li> The matrix operates in the sense V(true) = rmatn * V(mean),
11134 * where the p-vector V(true) is with respect to the true
11135 * equatorial triad of date and the p-vector V(mean) is with
11136 * respect to the mean equatorial triad of date.
11137 *</ol>
11138 *<p>Called:<ul>
11139 * <li>{@link #jauIr} initialize r-matrix to identity
11140 * <li>{@link #jauRx} rotate around X-axis
11141 * <li>{@link #jauRz} rotate around Z-axis
11142 * </ul>
11143 *<p>Reference:
11144 *
11145 * <p>Explanatory Supplement to the Astronomical Almanac,
11146 * P. Kenneth Seidelmann (ed), University Science Books (1992),
11147 * Section 3.222-3 (p114).
11148 *
11149 *@version 2008 May 11
11150 *
11151 * @since Release 20101201
11152 *
11153 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
11154 */
11155 public static double[][] jauNumat(double epsa, double dpsi, double deps)
11156 {
11157 double rmatn[][] = new double[3][3];
11158 /* Build the rotation matrix. */
11159 jauIr(rmatn);
11160 jauRx(epsa, rmatn);
11161 jauRz(-dpsi, rmatn);
11162 jauRx(-(epsa + deps), rmatn);
11163
11164 return rmatn;
11165
11166 }
11167 /**
11168 * Nutation Terms.
11169 * .
11170 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 21 Nov 2011
11171 * @version $Revision$ $date$
11172 */
11173 public static class NutationTerms {
11174 /** nutation component in longitude */
11175 public double dpsi;
11176 /** nutation component in obliquity */
11177 public double deps;
11178 public NutationTerms(double dpsi, double deps) {
11179 this.dpsi = dpsi;
11180 this.deps = deps;
11181 }
11182 }
11183 private static final class NutationModel {
11184 int nl,nlp,nf,nd,nom; /* coefficients of l,l',F,D,Om */
11185 double sp,spt,cp; /* longitude sin, t*sin, cos coefficients */
11186 double ce,cet,se; /* obliquity cos, t*cos, sin coefficients */
11187 public NutationModel(int nl,int nlp,int nf,int nd, int nom,
11188 double sp,double spt,double cp,
11189 double ce,double cet,double se ) {
11190 this.nl = nl;
11191 this.nlp = nlp;
11192 this.nf = nf;
11193 this.nd = nd;
11194 this.nom = nom;
11195 this.sp = sp;
11196 this.spt = spt;
11197 this.cp = cp;
11198 this.ce = ce;
11199 this.cet = cet;
11200 this.se = se;
11201 }
11202 }
11203 private final static class PlanetaryNutModel {
11204 final int nl, /* coefficients of l, F, D and Omega */
11205 nf,
11206 nd,
11207 nom,
11208 nme, /* coefficients of planetary longitudes */
11209 nve,
11210 nea,
11211 nma,
11212 nju,
11213 nsa,
11214 nur,
11215 nne,
11216 npa; /* coefficient of general precession */
11217 final int sp,cp; /* longitude sin, cos coefficients */
11218 final int se,ce; /* obliquity sin, cos coefficients */
11219 public PlanetaryNutModel( int nl,
11220 int nf,
11221 int nd,
11222 int nom,
11223 int nme,
11224 int nve,
11225 int nea,
11226 int nma,
11227 int nju,
11228 int nsa,
11229 int nur,
11230 int nne,
11231 int npa,
11232 int sp,int cp,
11233 int se,int ce
11234 ) {
11235 this.nl = nl; /* coefficients of l, F, D and Omega */
11236 this.nf = nf;
11237 this.nd = nd;
11238 this.nom = nom;
11239 this.nme = nme; /* coefficients of planetary longitudes */
11240 this.nve = nve;
11241 this.nea = nea;
11242 this.nma = nma;
11243 this.nju = nju;
11244 this.nsa = nsa;
11245 this.nur = nur;
11246 this.nne = nne;
11247 this.npa = npa; /* coefficient of general precession */
11248 this.sp = sp; this.cp = cp; /* longitude sin, cos coefficients */
11249 this.se = se; this.ce = ce; /* obliquity sin, cos coefficients */
11250
11251 }
11252 }
11253 /**
11254 * Nutation, IAU 2000A model (MHB2000 luni-solar and planetary nutation
11255 * with free core nutation omitted).
11256 *
11257 *<p>This function is derived from the International Astronomical Union's
11258 * SOFA (Standards Of Fundamental Astronomy) software collection.
11259 *
11260 *<p>Status: canonical model.
11261 *
11262 *<!-- Given: -->
11263 * @param date1 double TT as a 2-part Julian Date (Note 1)
11264 * @param date2 double TT as a 2-part Julian Date (Note 1)
11265 *
11266 *<!-- Returned: -->
11267 * @return <u>returned</u> nutation, luni-solar + planetary (Note 2)
11268 *
11269 * <p>Notes:
11270 * <ol>
11271 *
11272 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
11273 * convenient way between the two arguments. For example,
11274 * JD(TT)=2450123.7 could be expressed in any of these ways,
11275 * among others:
11276 *<pre>
11277 * date1 date2
11278 *
11279 * 2450123.7 0.0 (JD method)
11280 * 2451545.0 -1421.3 (J2000 method)
11281 * 2400000.5 50123.2 (MJD method)
11282 * 2450123.5 0.2 (date & time method)
11283 *</pre>
11284 * The JD method is the most natural and convenient to use in
11285 * cases where the loss of several decimal digits of resolution
11286 * is acceptable. The J2000 method is best matched to the way
11287 * the argument is handled internally and will deliver the
11288 * optimum resolution. The MJD method and the date & time methods
11289 * are both good compromises between resolution and convenience.
11290 *
11291 * <li> The nutation components in longitude and obliquity are in radians
11292 * and with respect to the equinox and ecliptic of date. The
11293 * obliquity at J2000.0 is assumed to be the Lieske et al. (1977)
11294 * value of 84381.448 arcsec.
11295 *
11296 * Both the luni-solar and planetary nutations are included. The
11297 * latter are due to direct planetary nutations and the
11298 * perturbations of the lunar and terrestrial orbits.
11299 *
11300 * <li> The function computes the MHB2000 nutation series with the
11301 * associated corrections for planetary nutations. It is an
11302 * implementation of the nutation part of the IAU 2000A precession-
11303 * nutation model, formally adopted by the IAU General Assembly in
11304 * 2000, namely MHB2000 (Mathews et al. 2002), but with the free
11305 * core nutation (FCN - see Note 4) omitted.
11306 *
11307 * <li> The full MHB2000 model also contains contributions to the
11308 * nutations in longitude and obliquity due to the free-excitation
11309 * of the free-core-nutation during the period 1979-2000. These FCN
11310 * terms, which are time-dependent and unpredictable, are NOT
11311 * included in the present function and, if required, must be
11312 * independently computed. With the FCN corrections included, the
11313 * present function delivers a pole which is at current epochs
11314 * accurate to a few hundred microarcseconds. The omission of FCN
11315 * introduces further errors of about that size.
11316 *
11317 * <li> The present function provides classical nutation. The MHB2000
11318 * algorithm, from which it is adapted, deals also with (i) the
11319 * offsets between the GCRS and mean poles and (ii) the adjustments
11320 * in longitude and obliquity due to the changed precession rates.
11321 * These additional functions, namely frame bias and precession
11322 * adjustments, are supported by the JSOFA functions jauBi00 and
11323 * jauPr00.
11324 *
11325 * <li> The MHB2000 algorithm also provides "total" nutations, comprising
11326 * the arithmetic sum of the frame bias, precession adjustments,
11327 * luni-solar nutation and planetary nutation. These total
11328 * nutations can be used in combination with an existing IAU 1976
11329 * precession implementation, such as jauPmat76, to deliver GCRS-
11330 * to-true predictions of sub-mas accuracy at current dates.
11331 * However, there are three shortcomings in the MHB2000 model that
11332 * must be taken into account if more accurate or definitive results
11333 * are required (see Wallace 2002):
11334 *
11335 * (i) The MHB2000 total nutations are simply arithmetic sums,
11336 * yet in reality the various components are successive Euler
11337 * rotations. This slight lack of rigor leads to cross terms
11338 * that exceed 1 mas after a century. The rigorous procedure
11339 * is to form the GCRS-to-true rotation matrix by applying the
11340 * bias, precession and nutation in that order.
11341 *
11342 * (ii) Although the precession adjustments are stated to be with
11343 * respect to Lieske et al. (1977), the MHB2000 model does
11344 * not specify which set of Euler angles are to be used and
11345 * how the adjustments are to be applied. The most literal
11346 * and straightforward procedure is to adopt the 4-rotation
11347 * epsilon_0, psi_A, omega_A, xi_A option, and to add DPSIPR
11348 * to psi_A and DEPSPR to both omega_A and eps_A.
11349 *
11350 * (iii) The MHB2000 model predates the determination by Chapront
11351 * et al. (2002) of a 14.6 mas displacement between the
11352 * J2000.0 mean equinox and the origin of the ICRS frame. It
11353 * should, however, be noted that neglecting this displacement
11354 * when calculating star coordinates does not lead to a
11355 * 14.6 mas change in right ascension, only a small second-
11356 * order distortion in the pattern of the precession-nutation
11357 * effect.
11358 *
11359 * For these reasons, the JSOFA functions do not generate the "total
11360 * nutations" directly, though they can of course easily be
11361 * generated by calling jauBi00, jauPr00 and the present function
11362 * and adding the results.
11363 *
11364 * <li> The MHB2000 model contains 41 instances where the same frequency
11365 * appears multiple times, of which 38 are duplicates and three are
11366 * triplicates. To keep the present code close to the original MHB
11367 * algorithm, this small inefficiency has not been corrected.
11368 *</ol>
11369 *<p>Called:<ul>
11370 * <li>{@link #jauFal03} mean anomaly of the Moon
11371 * <li>{@link #jauFaf03} mean argument of the latitude of the Moon
11372 * <li>{@link #jauFaom03} mean longitude of the Moon's ascending node
11373 * <li>{@link #jauFame03} mean longitude of Mercury
11374 * <li>{@link #jauFave03} mean longitude of Venus
11375 * <li>{@link #jauFae03} mean longitude of Earth
11376 * <li>{@link #jauFama03} mean longitude of Mars
11377 * <li>{@link #jauFaju03} mean longitude of Jupiter
11378 * <li>{@link #jauFasa03} mean longitude of Saturn
11379 * <li>{@link #jauFaur03} mean longitude of Uranus
11380 * <li>{@link #jauFapa03} general accumulated precession in longitude
11381 * </ul>
11382 *<p>References:
11383 *
11384 * <p>Chapront, J., Chapront-Touze, M. & Francou, G. 2002,
11385 * Astron.Astrophys. 387, 700
11386 *
11387 * <p>Lieske, J.H., Lederle, T., Fricke, W. & Morando, B. 1977,
11388 * Astron.Astrophys. 58, 1-16
11389 *
11390 * <p>Mathews, P.M., Herring, T.A., Buffet, B.A. 2002, J.Geophys.Res.
11391 * 107, B4. The MHB_2000 code itself was obtained on 9th September
11392 * 2002 from ftp//maia.usno.navy.mil/conv2000/chapter5/IAU2000A.
11393 *
11394 * <p>Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
11395 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
11396 *
11397 * <p>Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
11398 * Astron.Astrophys.Supp.Ser. 135, 111
11399 *
11400 * <p>Wallace, P.T., "Software for Implementing the IAU 2000
11401 * Resolutions", in IERS Workshop 5.1 (2002)
11402 *
11403 *@version 2009 December 17
11404 *
11405 * @since Release 20101201
11406 *
11407 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
11408 */
11409 public static NutationTerms jauNut00a(double date1, double date2 )
11410 {
11411 int i;
11412 double t, el, elp, f, d, om, arg, dp, de, sarg, carg,
11413 al, af, ad, aom, alme, alve, alea, alma,
11414 alju, alsa, alur, alne, apa, dpsils, depsls,
11415 dpsipl, depspl;
11416
11417 /* Units of 0.1 microarcsecond to radians */
11418 final double U2R = DAS2R / 1e7;
11419
11420 /* ------------------------- */
11421 /* Luni-Solar nutation model */
11422 /* ------------------------- */
11423
11424 /* The units for the sine and cosine coefficients are */
11425 /* 0.1 microarcsecond and the same per Julian century */
11426
11427
11428 NutationModel xls[] = {
11429
11430 /* 1- 10 */
11431 new NutationModel( 0, 0, 0, 0, 1,
11432 -172064161.0, -174666.0, 33386.0, 92052331.0, 9086.0, 15377.0),
11433 new NutationModel( 0, 0, 2,-2, 2,
11434 -13170906.0, -1675.0, -13696.0, 5730336.0, -3015.0, -4587.0),
11435 new NutationModel( 0, 0, 2, 0, 2,-2276413.0,-234.0,2796.0,978459.0,-485.0, 1374.0),
11436 new NutationModel( 0, 0, 0, 0, 2,2074554.0, 207.0, -698.0,-897492.0,470.0, -291.0),
11437 new NutationModel( 0, 1, 0, 0, 0,1475877.0,-3633.0,11817.0,73871.0,-184.0,-1924.0),
11438 new NutationModel( 0, 1, 2,-2, 2,-516821.0,1226.0, -524.0,224386.0,-677.0, -174.0),
11439 new NutationModel( 1, 0, 0, 0, 0, 711159.0, 73.0, -872.0, -6750.0, 0.0, 358.0),
11440 new NutationModel( 0, 0, 2, 0, 1,-387298.0,-367.0, 380.0, 200728.0, 18.0, 318.0),
11441 new NutationModel( 1, 0, 2, 0, 2,-301461.0, -36.0, 816.0, 129025.0,-63.0, 367.0),
11442 new NutationModel( 0,-1, 2,-2, 2, 215829.0,-494.0, 111.0, -95929.0,299.0, 132.0),
11443
11444 /* 11-20 */
11445 new NutationModel( 0, 0, 2,-2, 1, 128227.0, 137.0, 181.0, -68982.0, -9.0, 39.0),
11446 new NutationModel(-1, 0, 2, 0, 2, 123457.0, 11.0, 19.0, -53311.0, 32.0, -4.0),
11447 new NutationModel(-1, 0, 0, 2, 0, 156994.0, 10.0, -168.0, -1235.0, 0.0, 82.0),
11448 new NutationModel( 1, 0, 0, 0, 1, 63110.0, 63.0, 27.0, -33228.0, 0.0, -9.0),
11449 new NutationModel(-1, 0, 0, 0, 1, -57976.0, -63.0, -189.0, 31429.0, 0.0, -75.0),
11450 new NutationModel(-1, 0, 2, 2, 2, -59641.0, -11.0, 149.0, 25543.0,-11.0, 66.0),
11451 new NutationModel( 1, 0, 2, 0, 1, -51613.0, -42.0, 129.0, 26366.0, 0.0, 78.0),
11452 new NutationModel(-2, 0, 2, 0, 1, 45893.0, 50.0, 31.0, -24236.0,-10.0, 20.0),
11453 new NutationModel( 0, 0, 0, 2, 0, 63384.0, 11.0, -150.0, -1220.0, 0.0, 29.0),
11454 new NutationModel( 0, 0, 2, 2, 2, -38571.0, -1.0, 158.0, 16452.0,-11.0, 68.0),
11455
11456 /* 21-30 */
11457 new NutationModel( 0,-2, 2,-2, 2, 32481.0, 0.0, 0.0, -13870.0, 0.0, 0.0),
11458 new NutationModel(-2, 0, 0, 2, 0, -47722.0, 0.0, -18.0, 477.0, 0.0, -25.0),
11459 new NutationModel( 2, 0, 2, 0, 2, -31046.0, -1.0, 131.0, 13238.0,-11.0, 59.0),
11460 new NutationModel( 1, 0, 2,-2, 2, 28593.0, 0.0, -1.0, -12338.0, 10.0, -3.0),
11461 new NutationModel(-1, 0, 2, 0, 1, 20441.0, 21.0, 10.0, -10758.0, 0.0, -3.0),
11462 new NutationModel( 2, 0, 0, 0, 0, 29243.0, 0.0, -74.0, -609.0, 0.0, 13.0),
11463 new NutationModel( 0, 0, 2, 0, 0, 25887.0, 0.0, -66.0, -550.0, 0.0, 11.0),
11464 new NutationModel( 0, 1, 0, 0, 1, -14053.0, -25.0, 79.0, 8551.0, -2.0, -45.0),
11465 new NutationModel(-1, 0, 0, 2, 1, 15164.0, 10.0, 11.0, -8001.0, 0.0, -1.0),
11466 new NutationModel( 0, 2, 2,-2, 2, -15794.0, 72.0, -16.0, 6850.0,-42.0, -5.0),
11467
11468 /* 31-40 */
11469 new NutationModel( 0, 0,-2, 2, 0, 21783.0, 0.0, 13.0, -167.0, 0.0, 13.0),
11470 new NutationModel( 1, 0, 0,-2, 1, -12873.0, -10.0, -37.0, 6953.0, 0.0, -14.0),
11471 new NutationModel( 0,-1, 0, 0, 1, -12654.0, 11.0, 63.0, 6415.0, 0.0, 26.0),
11472 new NutationModel(-1, 0, 2, 2, 1, -10204.0, 0.0, 25.0, 5222.0, 0.0, 15.0),
11473 new NutationModel( 0, 2, 0, 0, 0, 16707.0, -85.0, -10.0, 168.0, -1.0, 10.0),
11474 new NutationModel( 1, 0, 2, 2, 2, -7691.0, 0.0, 44.0, 3268.0, 0.0, 19.0),
11475 new NutationModel(-2, 0, 2, 0, 0, -11024.0, 0.0, -14.0, 104.0, 0.0, 2.0),
11476 new NutationModel( 0, 1, 2, 0, 2, 7566.0, -21.0, -11.0, -3250.0, 0.0, -5.0),
11477 new NutationModel( 0, 0, 2, 2, 1, -6637.0, -11.0, 25.0, 3353.0, 0.0, 14.0),
11478 new NutationModel( 0,-1, 2, 0, 2, -7141.0, 21.0, 8.0, 3070.0, 0.0, 4.0),
11479
11480 /* 41-50 */
11481 new NutationModel( 0, 0, 0, 2, 1, -6302.0, -11.0, 2.0, 3272.0, 0.0, 4.0),
11482 new NutationModel( 1, 0, 2,-2, 1, 5800.0, 10.0, 2.0, -3045.0, 0.0, -1.0),
11483 new NutationModel( 2, 0, 2,-2, 2, 6443.0, 0.0, -7.0, -2768.0, 0.0, -4.0),
11484 new NutationModel(-2, 0, 0, 2, 1, -5774.0, -11.0, -15.0, 3041.0, 0.0, -5.0),
11485 new NutationModel( 2, 0, 2, 0, 1, -5350.0, 0.0, 21.0, 2695.0, 0.0, 12.0),
11486 new NutationModel( 0,-1, 2,-2, 1, -4752.0, -11.0, -3.0, 2719.0, 0.0, -3.0),
11487 new NutationModel( 0, 0, 0,-2, 1, -4940.0, -11.0, -21.0, 2720.0, 0.0, -9.0),
11488 new NutationModel(-1,-1, 0, 2, 0, 7350.0, 0.0, -8.0, -51.0, 0.0, 4.0),
11489 new NutationModel( 2, 0, 0,-2, 1, 4065.0, 0.0, 6.0, -2206.0, 0.0, 1.0),
11490 new NutationModel( 1, 0, 0, 2, 0, 6579.0, 0.0, -24.0, -199.0, 0.0, 2.0),
11491
11492 /* 51-60 */
11493 new NutationModel( 0, 1, 2,-2, 1, 3579.0, 0.0, 5.0, -1900.0, 0.0, 1.0),
11494 new NutationModel( 1,-1, 0, 0, 0, 4725.0, 0.0, -6.0, -41.0, 0.0, 3.0),
11495 new NutationModel(-2, 0, 2, 0, 2, -3075.0, 0.0, -2.0, 1313.0, 0.0, -1.0),
11496 new NutationModel( 3, 0, 2, 0, 2, -2904.0, 0.0, 15.0, 1233.0, 0.0, 7.0),
11497 new NutationModel( 0,-1, 0, 2, 0, 4348.0, 0.0, -10.0, -81.0, 0.0, 2.0),
11498 new NutationModel( 1,-1, 2, 0, 2, -2878.0, 0.0, 8.0, 1232.0, 0.0, 4.0),
11499 new NutationModel( 0, 0, 0, 1, 0, -4230.0, 0.0, 5.0, -20.0, 0.0, -2.0),
11500 new NutationModel(-1,-1, 2, 2, 2, -2819.0, 0.0, 7.0, 1207.0, 0.0, 3.0),
11501 new NutationModel(-1, 0, 2, 0, 0, -4056.0, 0.0, 5.0, 40.0, 0.0, -2.0),
11502 new NutationModel( 0,-1, 2, 2, 2, -2647.0, 0.0, 11.0, 1129.0, 0.0, 5.0),
11503
11504 /* 61-70 */
11505 new NutationModel(-2, 0, 0, 0, 1, -2294.0, 0.0, -10.0, 1266.0, 0.0, -4.0),
11506 new NutationModel( 1, 1, 2, 0, 2, 2481.0, 0.0, -7.0, -1062.0, 0.0, -3.0),
11507 new NutationModel( 2, 0, 0, 0, 1, 2179.0, 0.0, -2.0, -1129.0, 0.0, -2.0),
11508 new NutationModel(-1, 1, 0, 1, 0, 3276.0, 0.0, 1.0, -9.0, 0.0, 0.0),
11509 new NutationModel( 1, 1, 0, 0, 0, -3389.0, 0.0, 5.0, 35.0, 0.0, -2.0),
11510 new NutationModel( 1, 0, 2, 0, 0, 3339.0, 0.0, -13.0, -107.0, 0.0, 1.0),
11511 new NutationModel(-1, 0, 2,-2, 1, -1987.0, 0.0, -6.0, 1073.0, 0.0, -2.0),
11512 new NutationModel( 1, 0, 0, 0, 2, -1981.0, 0.0, 0.0, 854.0, 0.0, 0.0),
11513 new NutationModel(-1, 0, 0, 1, 0, 4026.0, 0.0, -353.0, -553.0, 0.0, -139.0),
11514 new NutationModel( 0, 0, 2, 1, 2, 1660.0, 0.0, -5.0, -710.0, 0.0, -2.0),
11515
11516 /* 71-80 */
11517 new NutationModel(-1, 0, 2, 4, 2, -1521.0, 0.0, 9.0, 647.0, 0.0, 4.0),
11518 new NutationModel(-1, 1, 0, 1, 1, 1314.0, 0.0, 0.0, -700.0, 0.0, 0.0),
11519 new NutationModel( 0,-2, 2,-2, 1, -1283.0, 0.0, 0.0, 672.0, 0.0, 0.0),
11520 new NutationModel( 1, 0, 2, 2, 1, -1331.0, 0.0, 8.0, 663.0, 0.0, 4.0),
11521 new NutationModel(-2, 0, 2, 2, 2, 1383.0, 0.0, -2.0, -594.0, 0.0, -2.0),
11522 new NutationModel(-1, 0, 0, 0, 2, 1405.0, 0.0, 4.0, -610.0, 0.0, 2.0),
11523 new NutationModel( 1, 1, 2,-2, 2, 1290.0, 0.0, 0.0, -556.0, 0.0, 0.0),
11524 new NutationModel(-2, 0, 2, 4, 2, -1214.0, 0.0, 5.0, 518.0, 0.0, 2.0),
11525 new NutationModel(-1, 0, 4, 0, 2, 1146.0, 0.0, -3.0, -490.0, 0.0, -1.0),
11526 new NutationModel( 2, 0, 2,-2, 1, 1019.0, 0.0, -1.0, -527.0, 0.0, -1.0),
11527
11528 /* 81-90 */
11529 new NutationModel( 2, 0, 2, 2, 2, -1100.0, 0.0, 9.0, 465.0, 0.0, 4.0),
11530 new NutationModel( 1, 0, 0, 2, 1, -970.0, 0.0, 2.0, 496.0, 0.0, 1.0),
11531 new NutationModel( 3, 0, 0, 0, 0, 1575.0, 0.0, -6.0, -50.0, 0.0, 0.0),
11532 new NutationModel( 3, 0, 2,-2, 2, 934.0, 0.0, -3.0, -399.0, 0.0, -1.0),
11533 new NutationModel( 0, 0, 4,-2, 2, 922.0, 0.0, -1.0, -395.0, 0.0, -1.0),
11534 new NutationModel( 0, 1, 2, 0, 1, 815.0, 0.0, -1.0, -422.0, 0.0, -1.0),
11535 new NutationModel( 0, 0,-2, 2, 1, 834.0, 0.0, 2.0, -440.0, 0.0, 1.0),
11536 new NutationModel( 0, 0, 2,-2, 3, 1248.0, 0.0, 0.0, -170.0, 0.0, 1.0),
11537 new NutationModel(-1, 0, 0, 4, 0, 1338.0, 0.0, -5.0, -39.0, 0.0, 0.0),
11538 new NutationModel( 2, 0,-2, 0, 1, 716.0, 0.0, -2.0, -389.0, 0.0, -1.0),
11539
11540 /* 91-100 */
11541 new NutationModel(-2, 0, 0, 4, 0, 1282.0, 0.0, -3.0, -23.0, 0.0, 1.0),
11542 new NutationModel(-1,-1, 0, 2, 1, 742.0, 0.0, 1.0, -391.0, 0.0, 0.0),
11543 new NutationModel(-1, 0, 0, 1, 1, 1020.0, 0.0, -25.0, -495.0, 0.0, -10.0),
11544 new NutationModel( 0, 1, 0, 0, 2, 715.0, 0.0, -4.0, -326.0, 0.0, 2.0),
11545 new NutationModel( 0, 0,-2, 0, 1, -666.0, 0.0, -3.0, 369.0, 0.0, -1.0),
11546 new NutationModel( 0,-1, 2, 0, 1, -667.0, 0.0, 1.0, 346.0, 0.0, 1.0),
11547 new NutationModel( 0, 0, 2,-1, 2, -704.0, 0.0, 0.0, 304.0, 0.0, 0.0),
11548 new NutationModel( 0, 0, 2, 4, 2, -694.0, 0.0, 5.0, 294.0, 0.0, 2.0),
11549 new NutationModel(-2,-1, 0, 2, 0, -1014.0, 0.0, -1.0, 4.0, 0.0, -1.0),
11550 new NutationModel( 1, 1, 0,-2, 1, -585.0, 0.0, -2.0, 316.0, 0.0, -1.0),
11551
11552 /* 101-110 */
11553 new NutationModel(-1, 1, 0, 2, 0, -949.0, 0.0, 1.0, 8.0, 0.0, -1.0),
11554 new NutationModel(-1, 1, 0, 1, 2, -595.0, 0.0, 0.0, 258.0, 0.0, 0.0),
11555 new NutationModel( 1,-1, 0, 0, 1, 528.0, 0.0, 0.0, -279.0, 0.0, 0.0),
11556 new NutationModel( 1,-1, 2, 2, 2, -590.0, 0.0, 4.0, 252.0, 0.0, 2.0),
11557 new NutationModel(-1, 1, 2, 2, 2, 570.0, 0.0, -2.0, -244.0, 0.0, -1.0),
11558 new NutationModel( 3, 0, 2, 0, 1, -502.0, 0.0, 3.0, 250.0, 0.0, 2.0),
11559 new NutationModel( 0, 1,-2, 2, 0, -875.0, 0.0, 1.0, 29.0, 0.0, 0.0),
11560 new NutationModel(-1, 0, 0,-2, 1, -492.0, 0.0, -3.0, 275.0, 0.0, -1.0),
11561 new NutationModel( 0, 1, 2, 2, 2, 535.0, 0.0, -2.0, -228.0, 0.0, -1.0),
11562 new NutationModel(-1,-1, 2, 2, 1, -467.0, 0.0, 1.0, 240.0, 0.0, 1.0),
11563
11564 /* 111-120 */
11565 new NutationModel( 0,-1, 0, 0, 2, 591.0, 0.0, 0.0, -253.0, 0.0, 0.0),
11566 new NutationModel( 1, 0, 2,-4, 1, -453.0, 0.0, -1.0, 244.0, 0.0, -1.0),
11567 new NutationModel(-1, 0,-2, 2, 0, 766.0, 0.0, 1.0, 9.0, 0.0, 0.0),
11568 new NutationModel( 0,-1, 2, 2, 1, -446.0, 0.0, 2.0, 225.0, 0.0, 1.0),
11569 new NutationModel( 2,-1, 2, 0, 2, -488.0, 0.0, 2.0, 207.0, 0.0, 1.0),
11570 new NutationModel( 0, 0, 0, 2, 2, -468.0, 0.0, 0.0, 201.0, 0.0, 0.0),
11571 new NutationModel( 1,-1, 2, 0, 1, -421.0, 0.0, 1.0, 216.0, 0.0, 1.0),
11572 new NutationModel(-1, 1, 2, 0, 2, 463.0, 0.0, 0.0, -200.0, 0.0, 0.0),
11573 new NutationModel( 0, 1, 0, 2, 0, -673.0, 0.0, 2.0, 14.0, 0.0, 0.0),
11574 new NutationModel( 0,-1,-2, 2, 0, 658.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11575
11576 /* 121-130 */
11577 new NutationModel( 0, 3, 2,-2, 2, -438.0, 0.0, 0.0, 188.0, 0.0, 0.0),
11578 new NutationModel( 0, 0, 0, 1, 1, -390.0, 0.0, 0.0, 205.0, 0.0, 0.0),
11579 new NutationModel(-1, 0, 2, 2, 0, 639.0, -11.0, -2.0, -19.0, 0.0, 0.0),
11580 new NutationModel( 2, 1, 2, 0, 2, 412.0, 0.0, -2.0, -176.0, 0.0, -1.0),
11581 new NutationModel( 1, 1, 0, 0, 1, -361.0, 0.0, 0.0, 189.0, 0.0, 0.0),
11582 new NutationModel( 1, 1, 2, 0, 1, 360.0, 0.0, -1.0, -185.0, 0.0, -1.0),
11583 new NutationModel( 2, 0, 0, 2, 0, 588.0, 0.0, -3.0, -24.0, 0.0, 0.0),
11584 new NutationModel( 1, 0,-2, 2, 0, -578.0, 0.0, 1.0, 5.0, 0.0, 0.0),
11585 new NutationModel(-1, 0, 0, 2, 2, -396.0, 0.0, 0.0, 171.0, 0.0, 0.0),
11586 new NutationModel( 0, 1, 0, 1, 0, 565.0, 0.0, -1.0, -6.0, 0.0, 0.0),
11587
11588 /* 131-140 */
11589 new NutationModel( 0, 1, 0,-2, 1, -335.0, 0.0, -1.0, 184.0, 0.0, -1.0),
11590 new NutationModel(-1, 0, 2,-2, 2, 357.0, 0.0, 1.0, -154.0, 0.0, 0.0),
11591 new NutationModel( 0, 0, 0,-1, 1, 321.0, 0.0, 1.0, -174.0, 0.0, 0.0),
11592 new NutationModel(-1, 1, 0, 0, 1, -301.0, 0.0, -1.0, 162.0, 0.0, 0.0),
11593 new NutationModel( 1, 0, 2,-1, 2, -334.0, 0.0, 0.0, 144.0, 0.0, 0.0),
11594 new NutationModel( 1,-1, 0, 2, 0, 493.0, 0.0, -2.0, -15.0, 0.0, 0.0),
11595 new NutationModel( 0, 0, 0, 4, 0, 494.0, 0.0, -2.0, -19.0, 0.0, 0.0),
11596 new NutationModel( 1, 0, 2, 1, 2, 337.0, 0.0, -1.0, -143.0, 0.0, -1.0),
11597 new NutationModel( 0, 0, 2, 1, 1, 280.0, 0.0, -1.0, -144.0, 0.0, 0.0),
11598 new NutationModel( 1, 0, 0,-2, 2, 309.0, 0.0, 1.0, -134.0, 0.0, 0.0),
11599
11600 /* 141-150 */
11601 new NutationModel(-1, 0, 2, 4, 1, -263.0, 0.0, 2.0, 131.0, 0.0, 1.0),
11602 new NutationModel( 1, 0,-2, 0, 1, 253.0, 0.0, 1.0, -138.0, 0.0, 0.0),
11603 new NutationModel( 1, 1, 2,-2, 1, 245.0, 0.0, 0.0, -128.0, 0.0, 0.0),
11604 new NutationModel( 0, 0, 2, 2, 0, 416.0, 0.0, -2.0, -17.0, 0.0, 0.0),
11605 new NutationModel(-1, 0, 2,-1, 1, -229.0, 0.0, 0.0, 128.0, 0.0, 0.0),
11606 new NutationModel(-2, 0, 2, 2, 1, 231.0, 0.0, 0.0, -120.0, 0.0, 0.0),
11607 new NutationModel( 4, 0, 2, 0, 2, -259.0, 0.0, 2.0, 109.0, 0.0, 1.0),
11608 new NutationModel( 2,-1, 0, 0, 0, 375.0, 0.0, -1.0, -8.0, 0.0, 0.0),
11609 new NutationModel( 2, 1, 2,-2, 2, 252.0, 0.0, 0.0, -108.0, 0.0, 0.0),
11610 new NutationModel( 0, 1, 2, 1, 2, -245.0, 0.0, 1.0, 104.0, 0.0, 0.0),
11611
11612 /* 151-160 */
11613 new NutationModel( 1, 0, 4,-2, 2, 243.0, 0.0, -1.0, -104.0, 0.0, 0.0),
11614 new NutationModel(-1,-1, 0, 0, 1, 208.0, 0.0, 1.0, -112.0, 0.0, 0.0),
11615 new NutationModel( 0, 1, 0, 2, 1, 199.0, 0.0, 0.0, -102.0, 0.0, 0.0),
11616 new NutationModel(-2, 0, 2, 4, 1, -208.0, 0.0, 1.0, 105.0, 0.0, 0.0),
11617 new NutationModel( 2, 0, 2, 0, 0, 335.0, 0.0, -2.0, -14.0, 0.0, 0.0),
11618 new NutationModel( 1, 0, 0, 1, 0, -325.0, 0.0, 1.0, 7.0, 0.0, 0.0),
11619 new NutationModel(-1, 0, 0, 4, 1, -187.0, 0.0, 0.0, 96.0, 0.0, 0.0),
11620 new NutationModel(-1, 0, 4, 0, 1, 197.0, 0.0, -1.0, -100.0, 0.0, 0.0),
11621 new NutationModel( 2, 0, 2, 2, 1, -192.0, 0.0, 2.0, 94.0, 0.0, 1.0),
11622 new NutationModel( 0, 0, 2,-3, 2, -188.0, 0.0, 0.0, 83.0, 0.0, 0.0),
11623
11624 /* 161-170 */
11625 new NutationModel(-1,-2, 0, 2, 0, 276.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11626 new NutationModel( 2, 1, 0, 0, 0, -286.0, 0.0, 1.0, 6.0, 0.0, 0.0),
11627 new NutationModel( 0, 0, 4, 0, 2, 186.0, 0.0, -1.0, -79.0, 0.0, 0.0),
11628 new NutationModel( 0, 0, 0, 0, 3, -219.0, 0.0, 0.0, 43.0, 0.0, 0.0),
11629 new NutationModel( 0, 3, 0, 0, 0, 276.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11630 new NutationModel( 0, 0, 2,-4, 1, -153.0, 0.0, -1.0, 84.0, 0.0, 0.0),
11631 new NutationModel( 0,-1, 0, 2, 1, -156.0, 0.0, 0.0, 81.0, 0.0, 0.0),
11632 new NutationModel( 0, 0, 0, 4, 1, -154.0, 0.0, 1.0, 78.0, 0.0, 0.0),
11633 new NutationModel(-1,-1, 2, 4, 2, -174.0, 0.0, 1.0, 75.0, 0.0, 0.0),
11634 new NutationModel( 1, 0, 2, 4, 2, -163.0, 0.0, 2.0, 69.0, 0.0, 1.0),
11635
11636 /* 171-180 */
11637 new NutationModel(-2, 2, 0, 2, 0, -228.0, 0.0, 0.0, 1.0, 0.0, 0.0),
11638 new NutationModel(-2,-1, 2, 0, 1, 91.0, 0.0, -4.0, -54.0, 0.0, -2.0),
11639 new NutationModel(-2, 0, 0, 2, 2, 175.0, 0.0, 0.0, -75.0, 0.0, 0.0),
11640 new NutationModel(-1,-1, 2, 0, 2, -159.0, 0.0, 0.0, 69.0, 0.0, 0.0),
11641 new NutationModel( 0, 0, 4,-2, 1, 141.0, 0.0, 0.0, -72.0, 0.0, 0.0),
11642 new NutationModel( 3, 0, 2,-2, 1, 147.0, 0.0, 0.0, -75.0, 0.0, 0.0),
11643 new NutationModel(-2,-1, 0, 2, 1, -132.0, 0.0, 0.0, 69.0, 0.0, 0.0),
11644 new NutationModel( 1, 0, 0,-1, 1, 159.0, 0.0, -28.0, -54.0, 0.0, 11.0),
11645 new NutationModel( 0,-2, 0, 2, 0, 213.0, 0.0, 0.0, -4.0, 0.0, 0.0),
11646 new NutationModel(-2, 0, 0, 4, 1, 123.0, 0.0, 0.0, -64.0, 0.0, 0.0),
11647
11648 /* 181-190 */
11649 new NutationModel(-3, 0, 0, 0, 1, -118.0, 0.0, -1.0, 66.0, 0.0, 0.0),
11650 new NutationModel( 1, 1, 2, 2, 2, 144.0, 0.0, -1.0, -61.0, 0.0, 0.0),
11651 new NutationModel( 0, 0, 2, 4, 1, -121.0, 0.0, 1.0, 60.0, 0.0, 0.0),
11652 new NutationModel( 3, 0, 2, 2, 2, -134.0, 0.0, 1.0, 56.0, 0.0, 1.0),
11653 new NutationModel(-1, 1, 2,-2, 1, -105.0, 0.0, 0.0, 57.0, 0.0, 0.0),
11654 new NutationModel( 2, 0, 0,-4, 1, -102.0, 0.0, 0.0, 56.0, 0.0, 0.0),
11655 new NutationModel( 0, 0, 0,-2, 2, 120.0, 0.0, 0.0, -52.0, 0.0, 0.0),
11656 new NutationModel( 2, 0, 2,-4, 1, 101.0, 0.0, 0.0, -54.0, 0.0, 0.0),
11657 new NutationModel(-1, 1, 0, 2, 1, -113.0, 0.0, 0.0, 59.0, 0.0, 0.0),
11658 new NutationModel( 0, 0, 2,-1, 1, -106.0, 0.0, 0.0, 61.0, 0.0, 0.0),
11659
11660 /* 191-200 */
11661 new NutationModel( 0,-2, 2, 2, 2, -129.0, 0.0, 1.0, 55.0, 0.0, 0.0),
11662 new NutationModel( 2, 0, 0, 2, 1, -114.0, 0.0, 0.0, 57.0, 0.0, 0.0),
11663 new NutationModel( 4, 0, 2,-2, 2, 113.0, 0.0, -1.0, -49.0, 0.0, 0.0),
11664 new NutationModel( 2, 0, 0,-2, 2, -102.0, 0.0, 0.0, 44.0, 0.0, 0.0),
11665 new NutationModel( 0, 2, 0, 0, 1, -94.0, 0.0, 0.0, 51.0, 0.0, 0.0),
11666 new NutationModel( 1, 0, 0,-4, 1, -100.0, 0.0, -1.0, 56.0, 0.0, 0.0),
11667 new NutationModel( 0, 2, 2,-2, 1, 87.0, 0.0, 0.0, -47.0, 0.0, 0.0),
11668 new NutationModel(-3, 0, 0, 4, 0, 161.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11669 new NutationModel(-1, 1, 2, 0, 1, 96.0, 0.0, 0.0, -50.0, 0.0, 0.0),
11670 new NutationModel(-1,-1, 0, 4, 0, 151.0, 0.0, -1.0, -5.0, 0.0, 0.0),
11671
11672 /* 201-210 */
11673 new NutationModel(-1,-2, 2, 2, 2, -104.0, 0.0, 0.0, 44.0, 0.0, 0.0),
11674 new NutationModel(-2,-1, 2, 4, 2, -110.0, 0.0, 0.0, 48.0, 0.0, 0.0),
11675 new NutationModel( 1,-1, 2, 2, 1, -100.0, 0.0, 1.0, 50.0, 0.0, 0.0),
11676 new NutationModel(-2, 1, 0, 2, 0, 92.0, 0.0, -5.0, 12.0, 0.0, -2.0),
11677 new NutationModel(-2, 1, 2, 0, 1, 82.0, 0.0, 0.0, -45.0, 0.0, 0.0),
11678 new NutationModel( 2, 1, 0,-2, 1, 82.0, 0.0, 0.0, -45.0, 0.0, 0.0),
11679 new NutationModel(-3, 0, 2, 0, 1, -78.0, 0.0, 0.0, 41.0, 0.0, 0.0),
11680 new NutationModel(-2, 0, 2,-2, 1, -77.0, 0.0, 0.0, 43.0, 0.0, 0.0),
11681 new NutationModel(-1, 1, 0, 2, 2, 2.0, 0.0, 0.0, 54.0, 0.0, 0.0),
11682 new NutationModel( 0,-1, 2,-1, 2, 94.0, 0.0, 0.0, -40.0, 0.0, 0.0),
11683
11684 /* 211-220 */
11685 new NutationModel(-1, 0, 4,-2, 2, -93.0, 0.0, 0.0, 40.0, 0.0, 0.0),
11686 new NutationModel( 0,-2, 2, 0, 2, -83.0, 0.0, 10.0, 40.0, 0.0, -2.0),
11687 new NutationModel(-1, 0, 2, 1, 2, 83.0, 0.0, 0.0, -36.0, 0.0, 0.0),
11688 new NutationModel( 2, 0, 0, 0, 2, -91.0, 0.0, 0.0, 39.0, 0.0, 0.0),
11689 new NutationModel( 0, 0, 2, 0, 3, 128.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11690 new NutationModel(-2, 0, 4, 0, 2, -79.0, 0.0, 0.0, 34.0, 0.0, 0.0),
11691 new NutationModel(-1, 0,-2, 0, 1, -83.0, 0.0, 0.0, 47.0, 0.0, 0.0),
11692 new NutationModel(-1, 1, 2, 2, 1, 84.0, 0.0, 0.0, -44.0, 0.0, 0.0),
11693 new NutationModel( 3, 0, 0, 0, 1, 83.0, 0.0, 0.0, -43.0, 0.0, 0.0),
11694 new NutationModel(-1, 0, 2, 3, 2, 91.0, 0.0, 0.0, -39.0, 0.0, 0.0),
11695
11696 /* 221-230 */
11697 new NutationModel( 2,-1, 2, 0, 1, -77.0, 0.0, 0.0, 39.0, 0.0, 0.0),
11698 new NutationModel( 0, 1, 2, 2, 1, 84.0, 0.0, 0.0, -43.0, 0.0, 0.0),
11699 new NutationModel( 0,-1, 2, 4, 2, -92.0, 0.0, 1.0, 39.0, 0.0, 0.0),
11700 new NutationModel( 2,-1, 2, 2, 2, -92.0, 0.0, 1.0, 39.0, 0.0, 0.0),
11701 new NutationModel( 0, 2,-2, 2, 0, -94.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11702 new NutationModel(-1,-1, 2,-1, 1, 68.0, 0.0, 0.0, -36.0, 0.0, 0.0),
11703 new NutationModel( 0,-2, 0, 0, 1, -61.0, 0.0, 0.0, 32.0, 0.0, 0.0),
11704 new NutationModel( 1, 0, 2,-4, 2, 71.0, 0.0, 0.0, -31.0, 0.0, 0.0),
11705 new NutationModel( 1,-1, 0,-2, 1, 62.0, 0.0, 0.0, -34.0, 0.0, 0.0),
11706 new NutationModel(-1,-1, 2, 0, 1, -63.0, 0.0, 0.0, 33.0, 0.0, 0.0),
11707
11708 /* 231-240 */
11709 new NutationModel( 1,-1, 2,-2, 2, -73.0, 0.0, 0.0, 32.0, 0.0, 0.0),
11710 new NutationModel(-2,-1, 0, 4, 0, 115.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11711 new NutationModel(-1, 0, 0, 3, 0, -103.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11712 new NutationModel(-2,-1, 2, 2, 2, 63.0, 0.0, 0.0, -28.0, 0.0, 0.0),
11713 new NutationModel( 0, 2, 2, 0, 2, 74.0, 0.0, 0.0, -32.0, 0.0, 0.0),
11714 new NutationModel( 1, 1, 0, 2, 0, -103.0, 0.0, -3.0, 3.0, 0.0, -1.0),
11715 new NutationModel( 2, 0, 2,-1, 2, -69.0, 0.0, 0.0, 30.0, 0.0, 0.0),
11716 new NutationModel( 1, 0, 2, 1, 1, 57.0, 0.0, 0.0, -29.0, 0.0, 0.0),
11717 new NutationModel( 4, 0, 0, 0, 0, 94.0, 0.0, 0.0, -4.0, 0.0, 0.0),
11718 new NutationModel( 2, 1, 2, 0, 1, 64.0, 0.0, 0.0, -33.0, 0.0, 0.0),
11719
11720 /* 241-250 */
11721 new NutationModel( 3,-1, 2, 0, 2, -63.0, 0.0, 0.0, 26.0, 0.0, 0.0),
11722 new NutationModel(-2, 2, 0, 2, 1, -38.0, 0.0, 0.0, 20.0, 0.0, 0.0),
11723 new NutationModel( 1, 0, 2,-3, 1, -43.0, 0.0, 0.0, 24.0, 0.0, 0.0),
11724 new NutationModel( 1, 1, 2,-4, 1, -45.0, 0.0, 0.0, 23.0, 0.0, 0.0),
11725 new NutationModel(-1,-1, 2,-2, 1, 47.0, 0.0, 0.0, -24.0, 0.0, 0.0),
11726 new NutationModel( 0,-1, 0,-1, 1, -48.0, 0.0, 0.0, 25.0, 0.0, 0.0),
11727 new NutationModel( 0,-1, 0,-2, 1, 45.0, 0.0, 0.0, -26.0, 0.0, 0.0),
11728 new NutationModel(-2, 0, 0, 0, 2, 56.0, 0.0, 0.0, -25.0, 0.0, 0.0),
11729 new NutationModel(-2, 0,-2, 2, 0, 88.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11730 new NutationModel(-1, 0,-2, 4, 0, -75.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11731
11732 /* 251-260 */
11733 new NutationModel( 1,-2, 0, 0, 0, 85.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11734 new NutationModel( 0, 1, 0, 1, 1, 49.0, 0.0, 0.0, -26.0, 0.0, 0.0),
11735 new NutationModel(-1, 2, 0, 2, 0, -74.0, 0.0, -3.0, -1.0, 0.0, -1.0),
11736 new NutationModel( 1,-1, 2,-2, 1, -39.0, 0.0, 0.0, 21.0, 0.0, 0.0),
11737 new NutationModel( 1, 2, 2,-2, 2, 45.0, 0.0, 0.0, -20.0, 0.0, 0.0),
11738 new NutationModel( 2,-1, 2,-2, 2, 51.0, 0.0, 0.0, -22.0, 0.0, 0.0),
11739 new NutationModel( 1, 0, 2,-1, 1, -40.0, 0.0, 0.0, 21.0, 0.0, 0.0),
11740 new NutationModel( 2, 1, 2,-2, 1, 41.0, 0.0, 0.0, -21.0, 0.0, 0.0),
11741 new NutationModel(-2, 0, 0,-2, 1, -42.0, 0.0, 0.0, 24.0, 0.0, 0.0),
11742 new NutationModel( 1,-2, 2, 0, 2, -51.0, 0.0, 0.0, 22.0, 0.0, 0.0),
11743
11744 /* 261-270 */
11745 new NutationModel( 0, 1, 2, 1, 1, -42.0, 0.0, 0.0, 22.0, 0.0, 0.0),
11746 new NutationModel( 1, 0, 4,-2, 1, 39.0, 0.0, 0.0, -21.0, 0.0, 0.0),
11747 new NutationModel(-2, 0, 4, 2, 2, 46.0, 0.0, 0.0, -18.0, 0.0, 0.0),
11748 new NutationModel( 1, 1, 2, 1, 2, -53.0, 0.0, 0.0, 22.0, 0.0, 0.0),
11749 new NutationModel( 1, 0, 0, 4, 0, 82.0, 0.0, 0.0, -4.0, 0.0, 0.0),
11750 new NutationModel( 1, 0, 2, 2, 0, 81.0, 0.0, -1.0, -4.0, 0.0, 0.0),
11751 new NutationModel( 2, 0, 2, 1, 2, 47.0, 0.0, 0.0, -19.0, 0.0, 0.0),
11752 new NutationModel( 3, 1, 2, 0, 2, 53.0, 0.0, 0.0, -23.0, 0.0, 0.0),
11753 new NutationModel( 4, 0, 2, 0, 1, -45.0, 0.0, 0.0, 22.0, 0.0, 0.0),
11754 new NutationModel(-2,-1, 2, 0, 0, -44.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11755
11756 /* 271-280 */
11757 new NutationModel( 0, 1,-2, 2, 1, -33.0, 0.0, 0.0, 16.0, 0.0, 0.0),
11758 new NutationModel( 1, 0,-2, 1, 0, -61.0, 0.0, 0.0, 1.0, 0.0, 0.0),
11759 new NutationModel( 0,-1,-2, 2, 1, 28.0, 0.0, 0.0, -15.0, 0.0, 0.0),
11760 new NutationModel( 2,-1, 0,-2, 1, -38.0, 0.0, 0.0, 19.0, 0.0, 0.0),
11761 new NutationModel(-1, 0, 2,-1, 2, -33.0, 0.0, 0.0, 21.0, 0.0, 0.0),
11762 new NutationModel( 1, 0, 2,-3, 2, -60.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11763 new NutationModel( 0, 1, 2,-2, 3, 48.0, 0.0, 0.0, -10.0, 0.0, 0.0),
11764 new NutationModel( 0, 0, 2,-3, 1, 27.0, 0.0, 0.0, -14.0, 0.0, 0.0),
11765 new NutationModel(-1, 0,-2, 2, 1, 38.0, 0.0, 0.0, -20.0, 0.0, 0.0),
11766 new NutationModel( 0, 0, 2,-4, 2, 31.0, 0.0, 0.0, -13.0, 0.0, 0.0),
11767
11768 /* 281-290 */
11769 new NutationModel(-2, 1, 0, 0, 1, -29.0, 0.0, 0.0, 15.0, 0.0, 0.0),
11770 new NutationModel(-1, 0, 0,-1, 1, 28.0, 0.0, 0.0, -15.0, 0.0, 0.0),
11771 new NutationModel( 2, 0, 2,-4, 2, -32.0, 0.0, 0.0, 15.0, 0.0, 0.0),
11772 new NutationModel( 0, 0, 4,-4, 4, 45.0, 0.0, 0.0, -8.0, 0.0, 0.0),
11773 new NutationModel( 0, 0, 4,-4, 2, -44.0, 0.0, 0.0, 19.0, 0.0, 0.0),
11774 new NutationModel(-1,-2, 0, 2, 1, 28.0, 0.0, 0.0, -15.0, 0.0, 0.0),
11775 new NutationModel(-2, 0, 0, 3, 0, -51.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11776 new NutationModel( 1, 0,-2, 2, 1, -36.0, 0.0, 0.0, 20.0, 0.0, 0.0),
11777 new NutationModel(-3, 0, 2, 2, 2, 44.0, 0.0, 0.0, -19.0, 0.0, 0.0),
11778 new NutationModel(-3, 0, 2, 2, 1, 26.0, 0.0, 0.0, -14.0, 0.0, 0.0),
11779
11780 /* 291-300 */
11781 new NutationModel(-2, 0, 2, 2, 0, -60.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11782 new NutationModel( 2,-1, 0, 0, 1, 35.0, 0.0, 0.0, -18.0, 0.0, 0.0),
11783 new NutationModel(-2, 1, 2, 2, 2, -27.0, 0.0, 0.0, 11.0, 0.0, 0.0),
11784 new NutationModel( 1, 1, 0, 1, 0, 47.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11785 new NutationModel( 0, 1, 4,-2, 2, 36.0, 0.0, 0.0, -15.0, 0.0, 0.0),
11786 new NutationModel(-1, 1, 0,-2, 1, -36.0, 0.0, 0.0, 20.0, 0.0, 0.0),
11787 new NutationModel( 0, 0, 0,-4, 1, -35.0, 0.0, 0.0, 19.0, 0.0, 0.0),
11788 new NutationModel( 1,-1, 0, 2, 1, -37.0, 0.0, 0.0, 19.0, 0.0, 0.0),
11789 new NutationModel( 1, 1, 0, 2, 1, 32.0, 0.0, 0.0, -16.0, 0.0, 0.0),
11790 new NutationModel(-1, 2, 2, 2, 2, 35.0, 0.0, 0.0, -14.0, 0.0, 0.0),
11791
11792 /* 301-310 */
11793 new NutationModel( 3, 1, 2,-2, 2, 32.0, 0.0, 0.0, -13.0, 0.0, 0.0),
11794 new NutationModel( 0,-1, 0, 4, 0, 65.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11795 new NutationModel( 2,-1, 0, 2, 0, 47.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11796 new NutationModel( 0, 0, 4, 0, 1, 32.0, 0.0, 0.0, -16.0, 0.0, 0.0),
11797 new NutationModel( 2, 0, 4,-2, 2, 37.0, 0.0, 0.0, -16.0, 0.0, 0.0),
11798 new NutationModel(-1,-1, 2, 4, 1, -30.0, 0.0, 0.0, 15.0, 0.0, 0.0),
11799 new NutationModel( 1, 0, 0, 4, 1, -32.0, 0.0, 0.0, 16.0, 0.0, 0.0),
11800 new NutationModel( 1,-2, 2, 2, 2, -31.0, 0.0, 0.0, 13.0, 0.0, 0.0),
11801 new NutationModel( 0, 0, 2, 3, 2, 37.0, 0.0, 0.0, -16.0, 0.0, 0.0),
11802 new NutationModel(-1, 1, 2, 4, 2, 31.0, 0.0, 0.0, -13.0, 0.0, 0.0),
11803
11804 /* 311-320 */
11805 new NutationModel( 3, 0, 0, 2, 0, 49.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11806 new NutationModel(-1, 0, 4, 2, 2, 32.0, 0.0, 0.0, -13.0, 0.0, 0.0),
11807 new NutationModel( 1, 1, 2, 2, 1, 23.0, 0.0, 0.0, -12.0, 0.0, 0.0),
11808 new NutationModel(-2, 0, 2, 6, 2, -43.0, 0.0, 0.0, 18.0, 0.0, 0.0),
11809 new NutationModel( 2, 1, 2, 2, 2, 26.0, 0.0, 0.0, -11.0, 0.0, 0.0),
11810 new NutationModel(-1, 0, 2, 6, 2, -32.0, 0.0, 0.0, 14.0, 0.0, 0.0),
11811 new NutationModel( 1, 0, 2, 4, 1, -29.0, 0.0, 0.0, 14.0, 0.0, 0.0),
11812 new NutationModel( 2, 0, 2, 4, 2, -27.0, 0.0, 0.0, 12.0, 0.0, 0.0),
11813 new NutationModel( 1, 1,-2, 1, 0, 30.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11814 new NutationModel(-3, 1, 2, 1, 2, -11.0, 0.0, 0.0, 5.0, 0.0, 0.0),
11815
11816 /* 321-330 */
11817 new NutationModel( 2, 0,-2, 0, 2, -21.0, 0.0, 0.0, 10.0, 0.0, 0.0),
11818 new NutationModel(-1, 0, 0, 1, 2, -34.0, 0.0, 0.0, 15.0, 0.0, 0.0),
11819 new NutationModel(-4, 0, 2, 2, 1, -10.0, 0.0, 0.0, 6.0, 0.0, 0.0),
11820 new NutationModel(-1,-1, 0, 1, 0, -36.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11821 new NutationModel( 0, 0,-2, 2, 2, -9.0, 0.0, 0.0, 4.0, 0.0, 0.0),
11822 new NutationModel( 1, 0, 0,-1, 2, -12.0, 0.0, 0.0, 5.0, 0.0, 0.0),
11823 new NutationModel( 0,-1, 2,-2, 3, -21.0, 0.0, 0.0, 5.0, 0.0, 0.0),
11824 new NutationModel(-2, 1, 2, 0, 0, -29.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11825 new NutationModel( 0, 0, 2,-2, 4, -15.0, 0.0, 0.0, 3.0, 0.0, 0.0),
11826 new NutationModel(-2,-2, 0, 2, 0, -20.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11827
11828 /* 331-340 */
11829 new NutationModel(-2, 0,-2, 4, 0, 28.0, 0.0, 0.0, 0.0, 0.0, -2.0),
11830 new NutationModel( 0,-2,-2, 2, 0, 17.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11831 new NutationModel( 1, 2, 0,-2, 1, -22.0, 0.0, 0.0, 12.0, 0.0, 0.0),
11832 new NutationModel( 3, 0, 0,-4, 1, -14.0, 0.0, 0.0, 7.0, 0.0, 0.0),
11833 new NutationModel(-1, 1, 2,-2, 2, 24.0, 0.0, 0.0, -11.0, 0.0, 0.0),
11834 new NutationModel( 1,-1, 2,-4, 1, 11.0, 0.0, 0.0, -6.0, 0.0, 0.0),
11835 new NutationModel( 1, 1, 0,-2, 2, 14.0, 0.0, 0.0, -6.0, 0.0, 0.0),
11836 new NutationModel(-3, 0, 2, 0, 0, 24.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11837 new NutationModel(-3, 0, 2, 0, 2, 18.0, 0.0, 0.0, -8.0, 0.0, 0.0),
11838 new NutationModel(-2, 0, 0, 1, 0, -38.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11839
11840 /* 341-350 */
11841 new NutationModel( 0, 0,-2, 1, 0, -31.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11842 new NutationModel(-3, 0, 0, 2, 1, -16.0, 0.0, 0.0, 8.0, 0.0, 0.0),
11843 new NutationModel(-1,-1,-2, 2, 0, 29.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11844 new NutationModel( 0, 1, 2,-4, 1, -18.0, 0.0, 0.0, 10.0, 0.0, 0.0),
11845 new NutationModel( 2, 1, 0,-4, 1, -10.0, 0.0, 0.0, 5.0, 0.0, 0.0),
11846 new NutationModel( 0, 2, 0,-2, 1, -17.0, 0.0, 0.0, 10.0, 0.0, 0.0),
11847 new NutationModel( 1, 0, 0,-3, 1, 9.0, 0.0, 0.0, -4.0, 0.0, 0.0),
11848 new NutationModel(-2, 0, 2,-2, 2, 16.0, 0.0, 0.0, -6.0, 0.0, 0.0),
11849 new NutationModel(-2,-1, 0, 0, 1, 22.0, 0.0, 0.0, -12.0, 0.0, 0.0),
11850 new NutationModel(-4, 0, 0, 2, 0, 20.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11851
11852 /* 351-360 */
11853 new NutationModel( 1, 1, 0,-4, 1, -13.0, 0.0, 0.0, 6.0, 0.0, 0.0),
11854 new NutationModel(-1, 0, 2,-4, 1, -17.0, 0.0, 0.0, 9.0, 0.0, 0.0),
11855 new NutationModel( 0, 0, 4,-4, 1, -14.0, 0.0, 0.0, 8.0, 0.0, 0.0),
11856 new NutationModel( 0, 3, 2,-2, 2, 0.0, 0.0, 0.0, -7.0, 0.0, 0.0),
11857 new NutationModel(-3,-1, 0, 4, 0, 14.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11858 new NutationModel(-3, 0, 0, 4, 1, 19.0, 0.0, 0.0, -10.0, 0.0, 0.0),
11859 new NutationModel( 1,-1,-2, 2, 0, -34.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11860 new NutationModel(-1,-1, 0, 2, 2, -20.0, 0.0, 0.0, 8.0, 0.0, 0.0),
11861 new NutationModel( 1,-2, 0, 0, 1, 9.0, 0.0, 0.0, -5.0, 0.0, 0.0),
11862 new NutationModel( 1,-1, 0, 0, 2, -18.0, 0.0, 0.0, 7.0, 0.0, 0.0),
11863
11864 /* 361-370 */
11865 new NutationModel( 0, 0, 0, 1, 2, 13.0, 0.0, 0.0, -6.0, 0.0, 0.0),
11866 new NutationModel(-1,-1, 2, 0, 0, 17.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11867 new NutationModel( 1,-2, 2,-2, 2, -12.0, 0.0, 0.0, 5.0, 0.0, 0.0),
11868 new NutationModel( 0,-1, 2,-1, 1, 15.0, 0.0, 0.0, -8.0, 0.0, 0.0),
11869 new NutationModel(-1, 0, 2, 0, 3, -11.0, 0.0, 0.0, 3.0, 0.0, 0.0),
11870 new NutationModel( 1, 1, 0, 0, 2, 13.0, 0.0, 0.0, -5.0, 0.0, 0.0),
11871 new NutationModel(-1, 1, 2, 0, 0, -18.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11872 new NutationModel( 1, 2, 0, 0, 0, -35.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11873 new NutationModel(-1, 2, 2, 0, 2, 9.0, 0.0, 0.0, -4.0, 0.0, 0.0),
11874 new NutationModel(-1, 0, 4,-2, 1, -19.0, 0.0, 0.0, 10.0, 0.0, 0.0),
11875
11876 /* 371-380 */
11877 new NutationModel( 3, 0, 2,-4, 2, -26.0, 0.0, 0.0, 11.0, 0.0, 0.0),
11878 new NutationModel( 1, 2, 2,-2, 1, 8.0, 0.0, 0.0, -4.0, 0.0, 0.0),
11879 new NutationModel( 1, 0, 4,-4, 2, -10.0, 0.0, 0.0, 4.0, 0.0, 0.0),
11880 new NutationModel(-2,-1, 0, 4, 1, 10.0, 0.0, 0.0, -6.0, 0.0, 0.0),
11881 new NutationModel( 0,-1, 0, 2, 2, -21.0, 0.0, 0.0, 9.0, 0.0, 0.0),
11882 new NutationModel(-2, 1, 0, 4, 0, -15.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11883 new NutationModel(-2,-1, 2, 2, 1, 9.0, 0.0, 0.0, -5.0, 0.0, 0.0),
11884 new NutationModel( 2, 0,-2, 2, 0, -29.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11885 new NutationModel( 1, 0, 0, 1, 1, -19.0, 0.0, 0.0, 10.0, 0.0, 0.0),
11886 new NutationModel( 0, 1, 0, 2, 2, 12.0, 0.0, 0.0, -5.0, 0.0, 0.0),
11887
11888 /* 381-390 */
11889 new NutationModel( 1,-1, 2,-1, 2, 22.0, 0.0, 0.0, -9.0, 0.0, 0.0),
11890 new NutationModel(-2, 0, 4, 0, 1, -10.0, 0.0, 0.0, 5.0, 0.0, 0.0),
11891 new NutationModel( 2, 1, 0, 0, 1, -20.0, 0.0, 0.0, 11.0, 0.0, 0.0),
11892 new NutationModel( 0, 1, 2, 0, 0, -20.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11893 new NutationModel( 0,-1, 4,-2, 2, -17.0, 0.0, 0.0, 7.0, 0.0, 0.0),
11894 new NutationModel( 0, 0, 4,-2, 4, 15.0, 0.0, 0.0, -3.0, 0.0, 0.0),
11895 new NutationModel( 0, 2, 2, 0, 1, 8.0, 0.0, 0.0, -4.0, 0.0, 0.0),
11896 new NutationModel(-3, 0, 0, 6, 0, 14.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11897 new NutationModel(-1,-1, 0, 4, 1, -12.0, 0.0, 0.0, 6.0, 0.0, 0.0),
11898 new NutationModel( 1,-2, 0, 2, 0, 25.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11899
11900 /* 391-400 */
11901 new NutationModel(-1, 0, 0, 4, 2, -13.0, 0.0, 0.0, 6.0, 0.0, 0.0),
11902 new NutationModel(-1,-2, 2, 2, 1, -14.0, 0.0, 0.0, 8.0, 0.0, 0.0),
11903 new NutationModel(-1, 0, 0,-2, 2, 13.0, 0.0, 0.0, -5.0, 0.0, 0.0),
11904 new NutationModel( 1, 0,-2,-2, 1, -17.0, 0.0, 0.0, 9.0, 0.0, 0.0),
11905 new NutationModel( 0, 0,-2,-2, 1, -12.0, 0.0, 0.0, 6.0, 0.0, 0.0),
11906 new NutationModel(-2, 0,-2, 0, 1, -10.0, 0.0, 0.0, 5.0, 0.0, 0.0),
11907 new NutationModel( 0, 0, 0, 3, 1, 10.0, 0.0, 0.0, -6.0, 0.0, 0.0),
11908 new NutationModel( 0, 0, 0, 3, 0, -15.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11909 new NutationModel(-1, 1, 0, 4, 0, -22.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11910 new NutationModel(-1,-1, 2, 2, 0, 28.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11911
11912 /* 401-410 */
11913 new NutationModel(-2, 0, 2, 3, 2, 15.0, 0.0, 0.0, -7.0, 0.0, 0.0),
11914 new NutationModel( 1, 0, 0, 2, 2, 23.0, 0.0, 0.0, -10.0, 0.0, 0.0),
11915 new NutationModel( 0,-1, 2, 1, 2, 12.0, 0.0, 0.0, -5.0, 0.0, 0.0),
11916 new NutationModel( 3,-1, 0, 0, 0, 29.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11917 new NutationModel( 2, 0, 0, 1, 0, -25.0, 0.0, 0.0, 1.0, 0.0, 0.0),
11918 new NutationModel( 1,-1, 2, 0, 0, 22.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11919 new NutationModel( 0, 0, 2, 1, 0, -18.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11920 new NutationModel( 1, 0, 2, 0, 3, 15.0, 0.0, 0.0, 3.0, 0.0, 0.0),
11921 new NutationModel( 3, 1, 0, 0, 0, -23.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11922 new NutationModel( 3,-1, 2,-2, 2, 12.0, 0.0, 0.0, -5.0, 0.0, 0.0),
11923
11924 /* 411-420 */
11925 new NutationModel( 2, 0, 2,-1, 1, -8.0, 0.0, 0.0, 4.0, 0.0, 0.0),
11926 new NutationModel( 1, 1, 2, 0, 0, -19.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11927 new NutationModel( 0, 0, 4,-1, 2, -10.0, 0.0, 0.0, 4.0, 0.0, 0.0),
11928 new NutationModel( 1, 2, 2, 0, 2, 21.0, 0.0, 0.0, -9.0, 0.0, 0.0),
11929 new NutationModel(-2, 0, 0, 6, 0, 23.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11930 new NutationModel( 0,-1, 0, 4, 1, -16.0, 0.0, 0.0, 8.0, 0.0, 0.0),
11931 new NutationModel(-2,-1, 2, 4, 1, -19.0, 0.0, 0.0, 9.0, 0.0, 0.0),
11932 new NutationModel( 0,-2, 2, 2, 1, -22.0, 0.0, 0.0, 10.0, 0.0, 0.0),
11933 new NutationModel( 0,-1, 2, 2, 0, 27.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11934 new NutationModel(-1, 0, 2, 3, 1, 16.0, 0.0, 0.0, -8.0, 0.0, 0.0),
11935
11936 /* 421-430 */
11937 new NutationModel(-2, 1, 2, 4, 2, 19.0, 0.0, 0.0, -8.0, 0.0, 0.0),
11938 new NutationModel( 2, 0, 0, 2, 2, 9.0, 0.0, 0.0, -4.0, 0.0, 0.0),
11939 new NutationModel( 2,-2, 2, 0, 2, -9.0, 0.0, 0.0, 4.0, 0.0, 0.0),
11940 new NutationModel(-1, 1, 2, 3, 2, -9.0, 0.0, 0.0, 4.0, 0.0, 0.0),
11941 new NutationModel( 3, 0, 2,-1, 2, -8.0, 0.0, 0.0, 4.0, 0.0, 0.0),
11942 new NutationModel( 4, 0, 2,-2, 1, 18.0, 0.0, 0.0, -9.0, 0.0, 0.0),
11943 new NutationModel(-1, 0, 0, 6, 0, 16.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11944 new NutationModel(-1,-2, 2, 4, 2, -10.0, 0.0, 0.0, 4.0, 0.0, 0.0),
11945 new NutationModel(-3, 0, 2, 6, 2, -23.0, 0.0, 0.0, 9.0, 0.0, 0.0),
11946 new NutationModel(-1, 0, 2, 4, 0, 16.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11947
11948 /* 431-440 */
11949 new NutationModel( 3, 0, 0, 2, 1, -12.0, 0.0, 0.0, 6.0, 0.0, 0.0),
11950 new NutationModel( 3,-1, 2, 0, 1, -8.0, 0.0, 0.0, 4.0, 0.0, 0.0),
11951 new NutationModel( 3, 0, 2, 0, 0, 30.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11952 new NutationModel( 1, 0, 4, 0, 2, 24.0, 0.0, 0.0, -10.0, 0.0, 0.0),
11953 new NutationModel( 5, 0, 2,-2, 2, 10.0, 0.0, 0.0, -4.0, 0.0, 0.0),
11954 new NutationModel( 0,-1, 2, 4, 1, -16.0, 0.0, 0.0, 7.0, 0.0, 0.0),
11955 new NutationModel( 2,-1, 2, 2, 1, -16.0, 0.0, 0.0, 7.0, 0.0, 0.0),
11956 new NutationModel( 0, 1, 2, 4, 2, 17.0, 0.0, 0.0, -7.0, 0.0, 0.0),
11957 new NutationModel( 1,-1, 2, 4, 2, -24.0, 0.0, 0.0, 10.0, 0.0, 0.0),
11958 new NutationModel( 3,-1, 2, 2, 2, -12.0, 0.0, 0.0, 5.0, 0.0, 0.0),
11959
11960 /* 441-450 */
11961 new NutationModel( 3, 0, 2, 2, 1, -24.0, 0.0, 0.0, 11.0, 0.0, 0.0),
11962 new NutationModel( 5, 0, 2, 0, 2, -23.0, 0.0, 0.0, 9.0, 0.0, 0.0),
11963 new NutationModel( 0, 0, 2, 6, 2, -13.0, 0.0, 0.0, 5.0, 0.0, 0.0),
11964 new NutationModel( 4, 0, 2, 2, 2, -15.0, 0.0, 0.0, 7.0, 0.0, 0.0),
11965 new NutationModel( 0,-1, 1,-1, 1, 0.0, 0.0,-1988.0, 0.0, 0.0,-1679.0),
11966 new NutationModel(-1, 0, 1, 0, 3, 0.0, 0.0, -63.0, 0.0, 0.0, -27.0),
11967 new NutationModel( 0,-2, 2,-2, 3, -4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11968 new NutationModel( 1, 0,-1, 0, 1, 0.0, 0.0, 5.0, 0.0, 0.0, 4.0),
11969 new NutationModel( 2,-2, 0,-2, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0),
11970 new NutationModel(-1, 0, 1, 0, 2, 0.0, 0.0, 364.0, 0.0, 0.0, 176.0),
11971
11972 /* 451-460 */
11973 new NutationModel(-1, 0, 1, 0, 1, 0.0, 0.0,-1044.0, 0.0, 0.0, -891.0),
11974 new NutationModel(-1,-1, 2,-1, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0),
11975 new NutationModel(-2, 2, 0, 2, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11976 new NutationModel(-1, 0, 1, 0, 0, 0.0, 0.0, 330.0, 0.0, 0.0, 0.0),
11977 new NutationModel(-4, 1, 2, 2, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11978 new NutationModel(-3, 0, 2, 1, 1, 3.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11979 new NutationModel(-2,-1, 2, 0, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0),
11980 new NutationModel( 1, 0,-2, 1, 1, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11981 new NutationModel( 2,-1,-2, 0, 1, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11982 new NutationModel(-4, 0, 2, 2, 0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11983
11984 /* 461-470 */
11985 new NutationModel(-3, 1, 0, 3, 0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11986 new NutationModel(-1, 0,-1, 2, 0, 0.0, 0.0, 5.0, 0.0, 0.0, 0.0),
11987 new NutationModel( 0,-2, 0, 0, 2, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0),
11988 new NutationModel( 0,-2, 0, 0, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11989 new NutationModel(-3, 0, 0, 3, 0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11990 new NutationModel(-2,-1, 0, 2, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11991 new NutationModel(-1, 0,-2, 3, 0, -7.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11992 new NutationModel(-4, 0, 0, 4, 0, -12.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11993 new NutationModel( 2, 1,-2, 0, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0),
11994 new NutationModel( 2,-1, 0,-2, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11995
11996 /* 471-480 */
11997 new NutationModel( 0, 0, 1,-1, 0, -5.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11998 new NutationModel(-1, 2, 0, 1, 0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11999 new NutationModel(-2, 1, 2, 0, 2, -7.0, 0.0, 0.0, 3.0, 0.0, 0.0),
12000 new NutationModel( 1, 1, 0,-1, 1, 7.0, 0.0, 0.0, -4.0, 0.0, 0.0),
12001 new NutationModel( 1, 0, 1,-2, 1, 0.0, 0.0, -12.0, 0.0, 0.0, -10.0),
12002 new NutationModel( 0, 2, 0, 0, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12003 new NutationModel( 1,-1, 2,-3, 1, 3.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12004 new NutationModel(-1, 1, 2,-1, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12005 new NutationModel(-2, 0, 4,-2, 2, -7.0, 0.0, 0.0, 3.0, 0.0, 0.0),
12006 new NutationModel(-2, 0, 4,-2, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12007
12008 /* 481-490 */
12009 new NutationModel(-2,-2, 0, 2, 1, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0),
12010 new NutationModel(-2, 0,-2, 4, 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12011 new NutationModel( 1, 2, 2,-4, 1, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0),
12012 new NutationModel( 1, 1, 2,-4, 2, 7.0, 0.0, 0.0, -3.0, 0.0, 0.0),
12013 new NutationModel(-1, 2, 2,-2, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12014 new NutationModel( 2, 0, 0,-3, 1, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12015 new NutationModel(-1, 2, 0, 0, 1, -5.0, 0.0, 0.0, 3.0, 0.0, 0.0),
12016 new NutationModel( 0, 0, 0,-2, 0, 5.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12017 new NutationModel(-1,-1, 2,-2, 2, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12018 new NutationModel(-1, 1, 0, 0, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12019
12020 /* 491-500 */
12021 new NutationModel( 0, 0, 0,-1, 2, -8.0, 0.0, 0.0, 3.0, 0.0, 0.0),
12022 new NutationModel(-2, 1, 0, 1, 0, 9.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12023 new NutationModel( 1,-2, 0,-2, 1, 6.0, 0.0, 0.0, -3.0, 0.0, 0.0),
12024 new NutationModel( 1, 0,-2, 0, 2, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12025 new NutationModel(-3, 1, 0, 2, 0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12026 new NutationModel(-1, 1,-2, 2, 0, -7.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12027 new NutationModel(-1,-1, 0, 0, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0),
12028 new NutationModel(-3, 0, 0, 2, 0, 5.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12029 new NutationModel(-3,-1, 0, 2, 0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12030 new NutationModel( 2, 0, 2,-6, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12031
12032 /* 501-510 */
12033 new NutationModel( 0, 1, 2,-4, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12034 new NutationModel( 2, 0, 0,-4, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0),
12035 new NutationModel(-2, 1, 2,-2, 1, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12036 new NutationModel( 0,-1, 2,-4, 1, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12037 new NutationModel( 0, 1, 0,-2, 2, 9.0, 0.0, 0.0, -3.0, 0.0, 0.0),
12038 new NutationModel(-1, 0, 0,-2, 0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12039 new NutationModel( 2, 0,-2,-2, 1, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12040 new NutationModel(-4, 0, 2, 0, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12041 new NutationModel(-1,-1, 0,-1, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12042 new NutationModel( 0, 0,-2, 0, 2, 9.0, 0.0, 0.0, -3.0, 0.0, 0.0),
12043
12044 /* 511-520 */
12045 new NutationModel(-3, 0, 0, 1, 0, -4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12046 new NutationModel(-1, 0,-2, 1, 0, -4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12047 new NutationModel(-2, 0,-2, 2, 1, 3.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12048 new NutationModel( 0, 0,-4, 2, 0, 8.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12049 new NutationModel(-2,-1,-2, 2, 0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12050 new NutationModel( 1, 0, 2,-6, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12051 new NutationModel(-1, 0, 2,-4, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0),
12052 new NutationModel( 1, 0, 0,-4, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0),
12053 new NutationModel( 2, 1, 2,-4, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0),
12054 new NutationModel( 2, 1, 2,-4, 1, 6.0, 0.0, 0.0, -3.0, 0.0, 0.0),
12055
12056 /* 521-530 */
12057 new NutationModel( 0, 1, 4,-4, 4, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12058 new NutationModel( 0, 1, 4,-4, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0),
12059 new NutationModel(-1,-1,-2, 4, 0, -7.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12060 new NutationModel(-1,-3, 0, 2, 0, 9.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12061 new NutationModel(-1, 0,-2, 4, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12062 new NutationModel(-2,-1, 0, 3, 0, -3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12063 new NutationModel( 0, 0,-2, 3, 0, -4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12064 new NutationModel(-2, 0, 0, 3, 1, -5.0, 0.0, 0.0, 3.0, 0.0, 0.0),
12065 new NutationModel( 0,-1, 0, 1, 0, -13.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12066 new NutationModel(-3, 0, 2, 2, 0, -7.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12067
12068 /* 531-540 */
12069 new NutationModel( 1, 1,-2, 2, 0, 10.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12070 new NutationModel(-1, 1, 0, 2, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0),
12071 new NutationModel( 1,-2, 2,-2, 1, 10.0, 0.0, 13.0, 6.0, 0.0, -5.0),
12072 new NutationModel( 0, 0, 1, 0, 2, 0.0, 0.0, 30.0, 0.0, 0.0, 14.0),
12073 new NutationModel( 0, 0, 1, 0, 1, 0.0, 0.0, -162.0, 0.0, 0.0, -138.0),
12074 new NutationModel( 0, 0, 1, 0, 0, 0.0, 0.0, 75.0, 0.0, 0.0, 0.0),
12075 new NutationModel(-1, 2, 0, 2, 1, -7.0, 0.0, 0.0, 4.0, 0.0, 0.0),
12076 new NutationModel( 0, 0, 2, 0, 2, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12077 new NutationModel(-2, 0, 2, 0, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12078 new NutationModel( 2, 0, 0,-1, 1, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12079
12080 /* 541-550 */
12081 new NutationModel( 3, 0, 0,-2, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0),
12082 new NutationModel( 1, 0, 2,-2, 3, -3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12083 new NutationModel( 1, 2, 0, 0, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12084 new NutationModel( 2, 0, 2,-3, 2, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12085 new NutationModel(-1, 1, 4,-2, 2, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12086 new NutationModel(-2,-2, 0, 4, 0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12087 new NutationModel( 0,-3, 0, 2, 0, 9.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12088 new NutationModel( 0, 0,-2, 4, 0, 5.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12089 new NutationModel(-1,-1, 0, 3, 0, -7.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12090 new NutationModel(-2, 0, 0, 4, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0),
12091
12092 /* 551-560 */
12093 new NutationModel(-1, 0, 0, 3, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12094 new NutationModel( 2,-2, 0, 0, 0, 7.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12095 new NutationModel( 1,-1, 0, 1, 0, -4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12096 new NutationModel(-1, 0, 0, 2, 0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12097 new NutationModel( 0,-2, 2, 0, 1, -6.0, 0.0, -3.0, 3.0, 0.0, 1.0),
12098 new NutationModel(-1, 0, 1, 2, 1, 0.0, 0.0, -3.0, 0.0, 0.0, -2.0),
12099 new NutationModel(-1, 1, 0, 3, 0, 11.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12100 new NutationModel(-1,-1, 2, 1, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0),
12101 new NutationModel( 0,-1, 2, 0, 0, 11.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12102 new NutationModel(-2, 1, 2, 2, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12103
12104 /* 561-570 */
12105 new NutationModel( 2,-2, 2,-2, 2, -1.0, 0.0, 3.0, 3.0, 0.0, -1.0),
12106 new NutationModel( 1, 1, 0, 1, 1, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12107 new NutationModel( 1, 0, 1, 0, 1, 0.0, 0.0, -13.0, 0.0, 0.0, -11.0),
12108 new NutationModel( 1, 0, 1, 0, 0, 3.0, 0.0, 6.0, 0.0, 0.0, 0.0),
12109 new NutationModel( 0, 2, 0, 2, 0, -7.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12110 new NutationModel( 2,-1, 2,-2, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0),
12111 new NutationModel( 0,-1, 4,-2, 1, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0),
12112 new NutationModel( 0, 0, 4,-2, 3, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12113 new NutationModel( 0, 1, 4,-2, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0),
12114 new NutationModel( 4, 0, 2,-4, 2, -7.0, 0.0, 0.0, 3.0, 0.0, 0.0),
12115
12116 /* 571-580 */
12117 new NutationModel( 2, 2, 2,-2, 2, 8.0, 0.0, 0.0, -3.0, 0.0, 0.0),
12118 new NutationModel( 2, 0, 4,-4, 2, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12119 new NutationModel(-1,-2, 0, 4, 0, 11.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12120 new NutationModel(-1,-3, 2, 2, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0),
12121 new NutationModel(-3, 0, 2, 4, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0),
12122 new NutationModel(-3, 0, 2,-2, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12123 new NutationModel(-1,-1, 0,-2, 1, 8.0, 0.0, 0.0, -4.0, 0.0, 0.0),
12124 new NutationModel(-3, 0, 0, 0, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0),
12125 new NutationModel(-3, 0,-2, 2, 0, 11.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12126 new NutationModel( 0, 1, 0,-4, 1, -6.0, 0.0, 0.0, 3.0, 0.0, 0.0),
12127
12128 /* 581-590 */
12129 new NutationModel(-2, 1, 0,-2, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12130 new NutationModel(-4, 0, 0, 0, 1, -8.0, 0.0, 0.0, 4.0, 0.0, 0.0),
12131 new NutationModel(-1, 0, 0,-4, 1, -7.0, 0.0, 0.0, 3.0, 0.0, 0.0),
12132 new NutationModel(-3, 0, 0,-2, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12133 new NutationModel( 0, 0, 0, 3, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0),
12134 new NutationModel(-1, 1, 0, 4, 1, 6.0, 0.0, 0.0, -3.0, 0.0, 0.0),
12135 new NutationModel( 1,-2, 2, 0, 1, -6.0, 0.0, 0.0, 3.0, 0.0, 0.0),
12136 new NutationModel( 0, 1, 0, 3, 0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12137 new NutationModel(-1, 0, 2, 2, 3, 6.0, 0.0, 0.0, -1.0, 0.0, 0.0),
12138 new NutationModel( 0, 0, 2, 2, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12139
12140 /* 591-600 */
12141 new NutationModel(-2, 0, 2, 2, 2, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12142 new NutationModel(-1, 1, 2, 2, 0, -4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12143 new NutationModel( 3, 0, 0, 0, 2, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12144 new NutationModel( 2, 1, 0, 1, 0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12145 new NutationModel( 2,-1, 2,-1, 2, 6.0, 0.0, 0.0, -3.0, 0.0, 0.0),
12146 new NutationModel( 0, 0, 2, 0, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12147 new NutationModel( 0, 0, 3, 0, 3, 0.0, 0.0, -26.0, 0.0, 0.0, -11.0),
12148 new NutationModel( 0, 0, 3, 0, 2, 0.0, 0.0, -10.0, 0.0, 0.0, -5.0),
12149 new NutationModel(-1, 2, 2, 2, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0),
12150 new NutationModel(-1, 0, 4, 0, 0, -13.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12151
12152 /* 601-610 */
12153 new NutationModel( 1, 2, 2, 0, 1, 3.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12154 new NutationModel( 3, 1, 2,-2, 1, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12155 new NutationModel( 1, 1, 4,-2, 2, 7.0, 0.0, 0.0, -3.0, 0.0, 0.0),
12156 new NutationModel(-2,-1, 0, 6, 0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12157 new NutationModel( 0,-2, 0, 4, 0, 5.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12158 new NutationModel(-2, 0, 0, 6, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12159 new NutationModel(-2,-2, 2, 4, 2, -6.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12160 new NutationModel( 0,-3, 2, 2, 2, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12161 new NutationModel( 0, 0, 0, 4, 2, -7.0, 0.0, 0.0, 3.0, 0.0, 0.0),
12162 new NutationModel(-1,-1, 2, 3, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12163
12164 /* 611-620 */
12165 new NutationModel(-2, 0, 2, 4, 0, 13.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12166 new NutationModel( 2,-1, 0, 2, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12167 new NutationModel( 1, 0, 0, 3, 0, -3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12168 new NutationModel( 0, 1, 0, 4, 1, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12169 new NutationModel( 0, 1, 0, 4, 0, -11.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12170 new NutationModel( 1,-1, 2, 1, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12171 new NutationModel( 0, 0, 2, 2, 3, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12172 new NutationModel( 1, 0, 2, 2, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12173 new NutationModel(-1, 0, 2, 2, 2, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12174 new NutationModel(-2, 0, 4, 2, 1, 6.0, 0.0, 0.0, -3.0, 0.0, 0.0),
12175
12176 /* 621-630 */
12177 new NutationModel( 2, 1, 0, 2, 1, 3.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12178 new NutationModel( 2, 1, 0, 2, 0, -12.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12179 new NutationModel( 2,-1, 2, 0, 0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12180 new NutationModel( 1, 0, 2, 1, 0, -3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12181 new NutationModel( 0, 1, 2, 2, 0, -4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12182 new NutationModel( 2, 0, 2, 0, 3, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12183 new NutationModel( 3, 0, 2, 0, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0),
12184 new NutationModel( 1, 0, 2, 0, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0),
12185 new NutationModel( 1, 0, 3, 0, 3, 0.0, 0.0, -5.0, 0.0, 0.0, -2.0),
12186 new NutationModel( 1, 1, 2, 1, 1, -7.0, 0.0, 0.0, 4.0, 0.0, 0.0),
12187
12188 /* 631-640 */
12189 new NutationModel( 0, 2, 2, 2, 2, 6.0, 0.0, 0.0, -3.0, 0.0, 0.0),
12190 new NutationModel( 2, 1, 2, 0, 0, -3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12191 new NutationModel( 2, 0, 4,-2, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0),
12192 new NutationModel( 4, 1, 2,-2, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0),
12193 new NutationModel(-1,-1, 0, 6, 0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12194 new NutationModel(-3,-1, 2, 6, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0),
12195 new NutationModel(-1, 0, 0, 6, 1, -5.0, 0.0, 0.0, 3.0, 0.0, 0.0),
12196 new NutationModel(-3, 0, 2, 6, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12197 new NutationModel( 1,-1, 0, 4, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12198 new NutationModel( 1,-1, 0, 4, 0, 12.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12199
12200 /* 641-650 */
12201 new NutationModel(-2, 0, 2, 5, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0),
12202 new NutationModel( 1,-2, 2, 2, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12203 new NutationModel( 3,-1, 0, 2, 0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12204 new NutationModel( 1,-1, 2, 2, 0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12205 new NutationModel( 0, 0, 2, 3, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0),
12206 new NutationModel(-1, 1, 2, 4, 1, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12207 new NutationModel( 0, 1, 2, 3, 2, -6.0, 0.0, 0.0, 3.0, 0.0, 0.0),
12208 new NutationModel(-1, 0, 4, 2, 1, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12209 new NutationModel( 2, 0, 2, 1, 1, 6.0, 0.0, 0.0, -3.0, 0.0, 0.0),
12210 new NutationModel( 5, 0, 0, 0, 0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12211
12212 /* 651-660 */
12213 new NutationModel( 2, 1, 2, 1, 2, -6.0, 0.0, 0.0, 3.0, 0.0, 0.0),
12214 new NutationModel( 1, 0, 4, 0, 1, 3.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12215 new NutationModel( 3, 1, 2, 0, 1, 7.0, 0.0, 0.0, -4.0, 0.0, 0.0),
12216 new NutationModel( 3, 0, 4,-2, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12217 new NutationModel(-2,-1, 2, 6, 2, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12218 new NutationModel( 0, 0, 0, 6, 0, 5.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12219 new NutationModel( 0,-2, 2, 4, 2, -6.0, 0.0, 0.0, 3.0, 0.0, 0.0),
12220 new NutationModel(-2, 0, 2, 6, 1, -6.0, 0.0, 0.0, 3.0, 0.0, 0.0),
12221 new NutationModel( 2, 0, 0, 4, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12222 new NutationModel( 2, 0, 0, 4, 0, 10.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12223
12224 /* 661-670 */
12225 new NutationModel( 2,-2, 2, 2, 2, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12226 new NutationModel( 0, 0, 2, 4, 0, 7.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12227 new NutationModel( 1, 0, 2, 3, 2, 7.0, 0.0, 0.0, -3.0, 0.0, 0.0),
12228 new NutationModel( 4, 0, 0, 2, 0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12229 new NutationModel( 2, 0, 2, 2, 0, 11.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12230 new NutationModel( 0, 0, 4, 2, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12231 new NutationModel( 4,-1, 2, 0, 2, -6.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12232 new NutationModel( 3, 0, 2, 1, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12233 new NutationModel( 2, 1, 2, 2, 1, 3.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12234 new NutationModel( 4, 1, 2, 0, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12235
12236 /* 671-678 */
12237 new NutationModel(-1,-1, 2, 6, 2, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12238 new NutationModel(-1, 0, 2, 6, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12239 new NutationModel( 1,-1, 2, 4, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12240 new NutationModel( 1, 1, 2, 4, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12241 new NutationModel( 3, 1, 2, 2, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0),
12242 new NutationModel( 5, 0, 2, 0, 1, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0),
12243 new NutationModel( 2,-1, 2, 4, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0),
12244 new NutationModel( 2, 0, 2, 4, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0)
12245 };
12246
12247 /* Number of terms in the luni-solar nutation model */
12248 final int NLS = xls.length;
12249
12250 /* ------------------------
12251 /* Planetary nutation model */
12252 /* ------------------------ */
12253
12254 /* The units for the sine and cosine coefficients are */
12255 /* 0.1 microarcsecond */
12256
12257
12258 PlanetaryNutModel xpl[] = {
12259
12260 /* 1-10 */
12261 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 8,-16, 4, 5, 0, 0, 0, 1440, 0, 0, 0),
12262 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -8, 16,-4,-5, 0, 0, 2, 56,-117, -42, -40),
12263 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 8,-16, 4, 5, 0, 0, 2, 125, -43, 0, -54),
12264 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,-1, 2, 2, 0, 5, 0, 0),
12265 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -4, 8,-1,-5, 0, 0, 2, 3, -7, -3, 0),
12266 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 1, 3, 0, 0, -2),
12267 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, 3, -8, 3, 0, 0, 0, 0, -114, 0, 0, 61),
12268 new PlanetaryNutModel(-1, 0, 0, 0, 0, 10, -3, 0, 0, 0, 0, 0, 0, -219, 89, 0, 0),
12269 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0,-2, 6,-3, 0, 2, -3, 0, 0, 0),
12270 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0, -462,1604, 0, 0),
12271
12272 /* 11-20 */
12273 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -5, 8,-3, 0, 0, 0, 0, 99, 0, 0, -53),
12274 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -4, 8,-3, 0, 0, 0, 1, -3, 0, 0, 2),
12275 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, -8, 1, 5, 0, 0, 2, 0, 6, 2, 0),
12276 new PlanetaryNutModel( 0, 0, 0, 0, 0, -5, 6, 4, 0, 0, 0, 0, 2, 3, 0, 0, 0),
12277 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 2,-5, 0, 0, 2, -12, 0, 0, 0),
12278 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 2,-5, 0, 0, 1, 14,-218, 117, 8),
12279 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0, 2,-5, 0, 0, 0, 31,-481, -257, -17),
12280 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 2,-5, 0, 0, 0, -491, 128, 0, 0),
12281 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0,-2, 5, 0, 0, 0,-3084,5123, 2735,1647),
12282 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0,-2, 5, 0, 0, 1,-1444,2409,-1286,-771),
12283
12284 /* 21-30 */
12285 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0,-2, 5, 0, 0, 2, 11, -24, -11, -9),
12286 new PlanetaryNutModel( 2,-1,-1, 0, 0, 0, 3, -7, 0, 0, 0, 0, 0, 26, -9, 0, 0),
12287 new PlanetaryNutModel( 1, 0,-2, 0, 0, 19,-21, 3, 0, 0, 0, 0, 0, 103, -60, 0, 0),
12288 new PlanetaryNutModel( 0, 1,-1, 1, 0, 2, -4, 0,-3, 0, 0, 0, 0, 0, -13, -7, 0),
12289 new PlanetaryNutModel( 1, 0,-1, 1, 0, 0, -1, 0, 2, 0, 0, 0, 0, -26, -29, -16, 14),
12290 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0,-4,10, 0, 0, 0, 9, -27, -14, -5),
12291 new PlanetaryNutModel(-2, 0, 2, 1, 0, 0, 2, 0, 0,-5, 0, 0, 0, 12, 0, 0, -6),
12292 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -7, 4, 0, 0, 0, 0, 0, -7, 0, 0, 0),
12293 new PlanetaryNutModel( 0,-1, 1, 0, 0, 0, 1, 0, 1,-1, 0, 0, 0, 0, 24, 0, 0),
12294 new PlanetaryNutModel(-2, 0, 2, 1, 0, 0, 2, 0,-2, 0, 0, 0, 0, 284, 0, 0,-151),
12295
12296 /* 31-40 */
12297 new PlanetaryNutModel(-1, 0, 0, 0, 0, 18,-16, 0, 0, 0, 0, 0, 0, 226, 101, 0, 0),
12298 new PlanetaryNutModel(-2, 1, 1, 2, 0, 0, 1, 0,-2, 0, 0, 0, 0, 0, -8, -2, 0),
12299 new PlanetaryNutModel(-1, 1,-1, 1, 0, 18,-17, 0, 0, 0, 0, 0, 0, 0, -6, -3, 0),
12300 new PlanetaryNutModel(-1, 0, 1, 1, 0, 0, 2, -2, 0, 0, 0, 0, 0, 5, 0, 0, -3),
12301 new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 13, 0, 0, 0, 0, 0, 2, -41, 175, 76, 17),
12302 new PlanetaryNutModel( 0, 2,-2, 2, 0, -8, 11, 0, 0, 0, 0, 0, 0, 0, 15, 6, 0),
12303 new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 13, 0, 0, 0, 0, 0, 1, 425, 212, -133, 269),
12304 new PlanetaryNutModel( 0, 1,-1, 1, 0, -8, 12, 0, 0, 0, 0, 0, 0, 1200, 598, 319,-641),
12305 new PlanetaryNutModel( 0, 0, 0, 0, 0, 8,-13, 0, 0, 0, 0, 0, 0, 235, 334, 0, 0),
12306 new PlanetaryNutModel( 0, 1,-1, 1, 0, 8,-14, 0, 0, 0, 0, 0, 0, 11, -12, -7, -6),
12307
12308 /* 41-50 */
12309 new PlanetaryNutModel( 0, 0, 0, 0, 0, 8,-13, 0, 0, 0, 0, 0, 1, 5, -6, 3, 3),
12310 new PlanetaryNutModel(-2, 0, 2, 1, 0, 0, 2, 0,-4, 5, 0, 0, 0, -5, 0, 0, 3),
12311 new PlanetaryNutModel(-2, 0, 2, 2, 0, 3, -3, 0, 0, 0, 0, 0, 0, 6, 0, 0, -3),
12312 new PlanetaryNutModel(-2, 0, 2, 0, 0, 0, 2, 0,-3, 1, 0, 0, 0, 15, 0, 0, 0),
12313 new PlanetaryNutModel( 0, 0, 0, 1, 0, 3, -5, 0, 2, 0, 0, 0, 0, 13, 0, 0, -7),
12314 new PlanetaryNutModel(-2, 0, 2, 0, 0, 0, 2, 0,-4, 3, 0, 0, 0, -6, -9, 0, 0),
12315 new PlanetaryNutModel( 0,-1, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 266, -78, 0, 0),
12316 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, -1, 2, 0, 0, 0, 0, 0, -460,-435, -232, 246),
12317 new PlanetaryNutModel( 0, 1,-1, 2, 0, 0, -2, 2, 0, 0, 0, 0, 0, 0, 15, 7, 0),
12318 new PlanetaryNutModel(-1, 1, 0, 1, 0, 3, -5, 0, 0, 0, 0, 0, 0, -3, 0, 0, 2),
12319
12320 /* 51-60 */
12321 new PlanetaryNutModel(-1, 0, 1, 0, 0, 3, -4, 0, 0, 0, 0, 0, 0, 0, 131, 0, 0),
12322 new PlanetaryNutModel(-2, 0, 2, 0, 0, 0, 2, 0,-2,-2, 0, 0, 0, 4, 0, 0, 0),
12323 new PlanetaryNutModel(-2, 2, 0, 2, 0, 0, -5, 9, 0, 0, 0, 0, 0, 0, 3, 0, 0),
12324 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0, 0, 0,-1, 0, 0, 0, 4, 2, 0),
12325 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0),
12326 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0, 0, 0, 0, 2, 0, -17, -19, -10, 9),
12327 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, -9, -11, 6, -5),
12328 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, -6, 0, 0, 3),
12329 new PlanetaryNutModel(-1, 0, 1, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, -16, 8, 0, 0),
12330 new PlanetaryNutModel( 0,-1, 1, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 3, 0, 0),
12331
12332 /* 61-70 */
12333 new PlanetaryNutModel( 0, 1,-1, 2, 0, 0, -1, 0, 0, 2, 0, 0, 0, 11, 24, 11, -5),
12334 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, -9, 17, 0, 0, 0, 0, 0, -3, -4, -2, 1),
12335 new PlanetaryNutModel( 0, 0, 0, 2, 0, -3, 5, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1),
12336 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0,-1, 2, 0, 0, 0, 0, -8, -4, 0),
12337 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 1,-2, 0, 0, 0, 0, 3, 0, 0),
12338 new PlanetaryNutModel( 1, 0,-2, 0, 0, 17,-16, 0,-2, 0, 0, 0, 0, 0, 5, 0, 0),
12339 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0, 1,-3, 0, 0, 0, 0, 3, 2, 0),
12340 new PlanetaryNutModel(-2, 0, 2, 1, 0, 0, 5, -6, 0, 0, 0, 0, 0, -6, 4, 2, 3),
12341 new PlanetaryNutModel( 0,-2, 2, 0, 0, 0, 9,-13, 0, 0, 0, 0, 0, -3, -5, 0, 0),
12342 new PlanetaryNutModel( 0, 1,-1, 2, 0, 0, -1, 0, 0, 1, 0, 0, 0, -5, 0, 0, 2),
12343
12344 /* 71-80 */
12345 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4, 24, 13, -2),
12346 new PlanetaryNutModel( 0,-1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, -42, 20, 0, 0),
12347 new PlanetaryNutModel( 0,-2, 2, 0, 0, 5, -6, 0, 0, 0, 0, 0, 0, -10, 233, 0, 0),
12348 new PlanetaryNutModel( 0,-1, 1, 1, 0, 5, -7, 0, 0, 0, 0, 0, 0, -3, 0, 0, 1),
12349 new PlanetaryNutModel(-2, 0, 2, 0, 0, 6, -8, 0, 0, 0, 0, 0, 0, 78, -18, 0, 0),
12350 new PlanetaryNutModel( 2, 1,-3, 1, 0, -6, 7, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0),
12351 new PlanetaryNutModel( 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, -3, -1, 0),
12352 new PlanetaryNutModel( 0,-1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, -4, -2, 1),
12353 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0, 0, 0, 2, 0, 0, 0, -8, -4, -1),
12354 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, -5, 3, 0),
12355
12356 /* 81-90 */
12357 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, -7, 0, 0, 3),
12358 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -8, 15, 0, 0, 0, 0, 2, -14, 8, 3, 6),
12359 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -8, 15, 0, 0, 0, 0, 1, 0, 8, -4, 0),
12360 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -9, 15, 0, 0, 0, 0, 0, 0, 19, 10, 0),
12361 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 8,-15, 0, 0, 0, 0, 0, 45, -22, 0, 0),
12362 new PlanetaryNutModel( 1,-1,-1, 0, 0, 0, 8,-15, 0, 0, 0, 0, 0, -3, 0, 0, 0),
12363 new PlanetaryNutModel( 2, 0,-2, 0, 0, 2, -5, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0),
12364 new PlanetaryNutModel(-2, 0, 2, 0, 0, 0, 2, 0,-5, 5, 0, 0, 0, 0, 3, 0, 0),
12365 new PlanetaryNutModel( 2, 0,-2, 1, 0, 0, -6, 8, 0, 0, 0, 0, 0, 3, 5, 3, -2),
12366 new PlanetaryNutModel( 2, 0,-2, 1, 0, 0, -2, 0, 3, 0, 0, 0, 0, 89, -16, -9, -48),
12367
12368 /* 91-100 */
12369 new PlanetaryNutModel(-2, 1, 1, 0, 0, 0, 1, 0,-3, 0, 0, 0, 0, 0, 3, 0, 0),
12370 new PlanetaryNutModel(-2, 1, 1, 1, 0, 0, 1, 0,-3, 0, 0, 0, 0, -3, 7, 4, 2),
12371 new PlanetaryNutModel(-2, 0, 2, 0, 0, 0, 2, 0,-3, 0, 0, 0, 0, -349, -62, 0, 0),
12372 new PlanetaryNutModel(-2, 0, 2, 0, 0, 0, 6, -8, 0, 0, 0, 0, 0, -15, 22, 0, 0),
12373 new PlanetaryNutModel(-2, 0, 2, 0, 0, 0, 2, 0,-1,-5, 0, 0, 0, -3, 0, 0, 0),
12374 new PlanetaryNutModel(-1, 0, 1, 0, 0, 0, 1, 0,-1, 0, 0, 0, 0, -53, 0, 0, 0),
12375 new PlanetaryNutModel(-1, 1, 1, 1, 0,-20, 20, 0, 0, 0, 0, 0, 0, 5, 0, 0, -3),
12376 new PlanetaryNutModel( 1, 0,-2, 0, 0, 20,-21, 0, 0, 0, 0, 0, 0, 0, -8, 0, 0),
12377 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 8,-15, 0, 0, 0, 0, 0, 15, -7, -4, -8),
12378 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0,-10, 15, 0, 0, 0, 0, 0, -3, 0, 0, 1),
12379
12380 /* 101-110 */
12381 new PlanetaryNutModel( 0,-1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, -21, -78, 0, 0),
12382 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 20, -70, -37, -11),
12383 new PlanetaryNutModel( 0, 1,-1, 2, 0, 0, -1, 0, 1, 0, 0, 0, 0, 0, 6, 3, 0),
12384 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0,-2, 4, 0, 0, 0, 5, 3, 2, -2),
12385 new PlanetaryNutModel( 2, 0,-2, 1, 0, -6, 8, 0, 0, 0, 0, 0, 0, -17, -4, -2, 9),
12386 new PlanetaryNutModel( 0,-2, 2, 1, 0, 5, -6, 0, 0, 0, 0, 0, 0, 0, 6, 3, 0),
12387 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0,-1, 0, 0, 1, 32, 15, -8, 17),
12388 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0, 0,-1, 0, 0, 0, 174, 84, 45, -93),
12389 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 11, 56, 0, 0),
12390 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0, 0, 1, 0, 0, 0, -66, -12, -6, 35),
12391
12392 /* 111-120 */
12393 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 47, 8, 4, -25),
12394 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 8, 4, 0),
12395 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0, -9, 13, 0, 0, 0, 0, 0, 10, -22, -12, -5),
12396 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 7,-13, 0, 0, 0, 0, 0, -3, 0, 0, 2),
12397 new PlanetaryNutModel(-2, 0, 2, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, -24, 12, 0, 0),
12398 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 9,-17, 0, 0, 0, 0, 0, 5, -6, 0, 0),
12399 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -9, 17, 0, 0, 0, 0, 2, 3, 0, 0, -2),
12400 new PlanetaryNutModel( 1, 0,-1, 1, 0, 0, -3, 4, 0, 0, 0, 0, 0, 4, 3, 1, -2),
12401 new PlanetaryNutModel( 1, 0,-1, 1, 0, -3, 4, 0, 0, 0, 0, 0, 0, 0, 29, 15, 0),
12402 new PlanetaryNutModel( 0, 0, 0, 2, 0, 0, -1, 2, 0, 0, 0, 0, 0, -5, -4, -2, 2),
12403
12404 /* 121-130 */
12405 new PlanetaryNutModel( 0,-1, 1, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 8, -3, -1, -5),
12406 new PlanetaryNutModel( 0,-2, 2, 0, 1, 0, -2, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0),
12407 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -5, 0, 2, 0, 0, 0, 0, 10, 0, 0, 0),
12408 new PlanetaryNutModel(-2, 0, 2, 1, 0, 0, 2, 0,-3, 1, 0, 0, 0, 3, 0, 0, -2),
12409 new PlanetaryNutModel(-2, 0, 2, 1, 0, 3, -3, 0, 0, 0, 0, 0, 0, -5, 0, 0, 3),
12410 new PlanetaryNutModel( 0, 0, 0, 1, 0, 8,-13, 0, 0, 0, 0, 0, 0, 46, 66, 35, -25),
12411 new PlanetaryNutModel( 0,-1, 1, 0, 0, 8,-12, 0, 0, 0, 0, 0, 0, -14, 7, 0, 0),
12412 new PlanetaryNutModel( 0, 2,-2, 1, 0, -8, 11, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0),
12413 new PlanetaryNutModel(-1, 0, 1, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, -5, 0, 0, 0),
12414 new PlanetaryNutModel(-1, 0, 0, 1, 0, 18,-16, 0, 0, 0, 0, 0, 0, -68, -34, -18, 36),
12415
12416 /* 131-140 */
12417 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0,-1, 1, 0, 0, 0, 0, 14, 7, 0),
12418 new PlanetaryNutModel( 0, 0, 0, 1, 0, 3, -7, 4, 0, 0, 0, 0, 0, 10, -6, -3, -5),
12419 new PlanetaryNutModel(-2, 1, 1, 1, 0, 0, -3, 7, 0, 0, 0, 0, 0, -5, -4, -2, 3),
12420 new PlanetaryNutModel( 0, 1,-1, 2, 0, 0, -1, 0,-2, 5, 0, 0, 0, -3, 5, 2, 1),
12421 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 0, 0,-2, 5, 0, 0, 0, 76, 17, 9, -41),
12422 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, -4, 8,-3, 0, 0, 0, 0, 84, 298, 159, -45),
12423 new PlanetaryNutModel( 1, 0, 0, 1, 0,-10, 3, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1),
12424 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0, -2, 0, 0, 0, 0, 0, 0, -3, 0, 0, 2),
12425 new PlanetaryNutModel(-1, 0, 0, 1, 0, 10, -3, 0, 0, 0, 0, 0, 0, -3, 0, 0, 1),
12426 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 4, -8, 3, 0, 0, 0, 0, -82, 292, 156, 44),
12427
12428 /* 141-150 */
12429 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 0, 0, 2,-5, 0, 0, 0, -73, 17, 9, 39),
12430 new PlanetaryNutModel( 0,-1, 1, 0, 0, 0, 1, 0, 2,-5, 0, 0, 0, -9, -16, 0, 0),
12431 new PlanetaryNutModel( 2,-1,-1, 1, 0, 0, 3, -7, 0, 0, 0, 0, 0, 3, 0, -1, -2),
12432 new PlanetaryNutModel(-2, 0, 2, 0, 0, 0, 2, 0, 0,-5, 0, 0, 0, -3, 0, 0, 0),
12433 new PlanetaryNutModel( 0, 0, 0, 1, 0, -3, 7, -4, 0, 0, 0, 0, 0, -9, -5, -3, 5),
12434 new PlanetaryNutModel(-2, 0, 2, 0, 0, 0, 2, 0,-2, 0, 0, 0, 0, -439, 0, 0, 0),
12435 new PlanetaryNutModel( 1, 0, 0, 1, 0,-18, 16, 0, 0, 0, 0, 0, 0, 57, -28, -15, -30),
12436 new PlanetaryNutModel(-2, 1, 1, 1, 0, 0, 1, 0,-2, 0, 0, 0, 0, 0, -6, -3, 0),
12437 new PlanetaryNutModel( 0, 1,-1, 2, 0, -8, 12, 0, 0, 0, 0, 0, 0, -4, 0, 0, 2),
12438 new PlanetaryNutModel( 0, 0, 0, 1, 0, -8, 13, 0, 0, 0, 0, 0, 0, -40, 57, 30, 21),
12439
12440 /* 151-160 */
12441 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 1, 23, 7, 3, -13),
12442 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, 0, -2, 0, 0, 0, 0, 0, 273, 80, 43,-146),
12443 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, -449, 430, 0, 0),
12444 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -2, 2, 0, 0, 0, 0, 0, -8, -47, -25, 4),
12445 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -1, 2, 0, 0, 0, 0, 1, 6, 47, 25, -3),
12446 new PlanetaryNutModel(-1, 0, 1, 1, 0, 3, -4, 0, 0, 0, 0, 0, 0, 0, 23, 13, 0),
12447 new PlanetaryNutModel(-1, 0, 1, 1, 0, 0, 3, -4, 0, 0, 0, 0, 0, -3, 0, 0, 2),
12448 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0, 0,-2, 0, 0, 0, 3, -4, -2, -2),
12449 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0, 0, 2, 0, 0, 0, -48,-110, -59, 26),
12450 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 51, 114, 61, -27),
12451
12452 /* 161-170 */
12453 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, -133, 0, 0, 57),
12454 new PlanetaryNutModel( 0, 1,-1, 0, 0, 3, -6, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0),
12455 new PlanetaryNutModel( 0, 0, 0, 1, 0, -3, 5, 0, 0, 0, 0, 0, 0, -21, -6, -3, 11),
12456 new PlanetaryNutModel( 0, 1,-1, 2, 0, -3, 4, 0, 0, 0, 0, 0, 0, 0, -3, -1, 0),
12457 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, -2, 4, 0, 0, 0, 0, 0, -11, -21, -11, 6),
12458 new PlanetaryNutModel( 0, 2,-2, 1, 0, -5, 6, 0, 0, 0, 0, 0, 0, -18,-436, -233, 9),
12459 new PlanetaryNutModel( 0,-1, 1, 0, 0, 5, -7, 0, 0, 0, 0, 0, 0, 35, -7, 0, 0),
12460 new PlanetaryNutModel( 0, 0, 0, 1, 0, 5, -8, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0),
12461 new PlanetaryNutModel(-2, 0, 2, 1, 0, 6, -8, 0, 0, 0, 0, 0, 0, 11, -3, -1, -6),
12462 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, -8, 15, 0, 0, 0, 0, 0, -5, -3, -1, 3),
12463
12464 /* 171-180 */
12465 new PlanetaryNutModel(-2, 0, 2, 1, 0, 0, 2, 0,-3, 0, 0, 0, 0, -53, -9, -5, 28),
12466 new PlanetaryNutModel(-2, 0, 2, 1, 0, 0, 6, -8, 0, 0, 0, 0, 0, 0, 3, 2, 1),
12467 new PlanetaryNutModel( 1, 0,-1, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0, 4, 0, 0, -2),
12468 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 3,-5, 0, 0, 0, 0, -4, 0, 0),
12469 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0,-1, 0, 0, 0, 0, -50, 194, 103, 27),
12470 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0,-1, 0, 0, 0, 1, -13, 52, 28, 7),
12471 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, -91, 248, 0, 0),
12472 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 6, 49, 26, -3),
12473 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0, -6, -47, -25, 3),
12474 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5, 3, 0),
12475
12476 /* 181-190 */
12477 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 52, 23, 10, -23),
12478 new PlanetaryNutModel( 0, 1,-1, 2, 0, 0, -1, 0, 0,-1, 0, 0, 0, -3, 0, 0, 1),
12479 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 0, 0, 0,-1, 0, 0, 0, 0, 5, 3, 0),
12480 new PlanetaryNutModel( 0,-1, 1, 0, 0, 0, 1, 0, 0,-1, 0, 0, 0, -4, 0, 0, 0),
12481 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -7, 13, 0, 0, 0, 0, 2, -4, 8, 3, 2),
12482 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 7,-13, 0, 0, 0, 0, 0, 10, 0, 0, 0),
12483 new PlanetaryNutModel( 2, 0,-2, 1, 0, 0, -5, 6, 0, 0, 0, 0, 0, 3, 0, 0, -2),
12484 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0, -8, 11, 0, 0, 0, 0, 0, 0, 8, 4, 0),
12485 new PlanetaryNutModel( 0, 2,-2, 1,-1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 8, 4, 1),
12486 new PlanetaryNutModel(-2, 0, 2, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, -4, 0, 0, 0),
12487
12488 /* 191-200 */
12489 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 2,-2, 0, 0, 0, -4, 0, 0, 0),
12490 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0, 0, 3, 0, 0, 0, -8, 4, 2, 4),
12491 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 1, 8, -4, -2, -4),
12492 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 2, 0, 15, 7, 0),
12493 new PlanetaryNutModel(-2, 0, 2, 0, 0, 3, -3, 0, 0, 0, 0, 0, 0, -138, 0, 0, 0),
12494 new PlanetaryNutModel( 0, 0, 0, 2, 0, 0, -4, 8,-3, 0, 0, 0, 0, 0, -7, -3, 0),
12495 new PlanetaryNutModel( 0, 0, 0, 2, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, -7, -3, 0),
12496 new PlanetaryNutModel( 2, 0,-2, 1, 0, 0, -2, 0, 2, 0, 0, 0, 0, 54, 0, 0, -29),
12497 new PlanetaryNutModel( 0, 1,-1, 2, 0, 0, -1, 0, 2, 0, 0, 0, 0, 0, 10, 4, 0),
12498 new PlanetaryNutModel( 0, 1,-1, 2, 0, 0, 0, -2, 0, 0, 0, 0, 0, -7, 0, 0, 3),
12499
12500 /* 201-210 */
12501 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 1, -2, 0, 0, 0, 0, 0, -37, 35, 19, 20),
12502 new PlanetaryNutModel( 0,-1, 1, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, 4, 0, 0),
12503 new PlanetaryNutModel( 0,-1, 1, 0, 0, 0, 1, 0, 0,-2, 0, 0, 0, -4, 9, 0, 0),
12504 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0, -2, 0, 0, 2, 0, 0, 0, 8, 0, 0, -4),
12505 new PlanetaryNutModel( 0, 1,-1, 1, 0, 3, -6, 0, 0, 0, 0, 0, 0, -9, -14, -8, 5),
12506 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, 1, -3, -9, -5, 3),
12507 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, 0, -145, 47, 0, 0),
12508 new PlanetaryNutModel( 0, 1,-1, 1, 0, -3, 4, 0, 0, 0, 0, 0, 0, -10, 40, 21, 5),
12509 new PlanetaryNutModel( 0, 0, 0, 0, 0, -3, 5, 0, 0, 0, 0, 0, 1, 11, -49, -26, -7),
12510 new PlanetaryNutModel( 0, 0, 0, 0, 0, -3, 5, 0, 0, 0, 0, 0, 2,-2150, 0, 0, 932),
12511
12512 /* 211-220 */
12513 new PlanetaryNutModel( 0, 2,-2, 2, 0, -3, 3, 0, 0, 0, 0, 0, 0, -12, 0, 0, 5),
12514 new PlanetaryNutModel( 0, 0, 0, 0, 0, -3, 5, 0, 0, 0, 0, 0, 2, 85, 0, 0, -37),
12515 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 1, 4, 0, 0, -2),
12516 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, 1, -4, 0, 0, 0, 0, 0, 3, 0, 0, -2),
12517 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 0, -86, 153, 0, 0),
12518 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -2, 4, 0, 0, 0, 0, 1, -6, 9, 5, 3),
12519 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -3, 4, 0, 0, 0, 0, 0, 9, -13, -7, -5),
12520 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -2, 4, 0, 0, 0, 0, 1, -8, 12, 6, 4),
12521 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -2, 4, 0, 0, 0, 0, 2, -51, 0, 0, 22),
12522 new PlanetaryNutModel( 0, 0, 0, 0, 0, -5, 8, 0, 0, 0, 0, 0, 2, -11,-268, -116, 5),
12523
12524 /* 221-230 */
12525 new PlanetaryNutModel( 0, 2,-2, 2, 0, -5, 6, 0, 0, 0, 0, 0, 0, 0, 12, 5, 0),
12526 new PlanetaryNutModel( 0, 0, 0, 0, 0, -5, 8, 0, 0, 0, 0, 0, 2, 0, 7, 3, 0),
12527 new PlanetaryNutModel( 0, 0, 0, 0, 0, -5, 8, 0, 0, 0, 0, 0, 1, 31, 6, 3, -17),
12528 new PlanetaryNutModel( 0, 1,-1, 1, 0, -5, 7, 0, 0, 0, 0, 0, 0, 140, 27, 14, -75),
12529 new PlanetaryNutModel( 0, 0, 0, 0, 0, -5, 8, 0, 0, 0, 0, 0, 1, 57, 11, 6, -30),
12530 new PlanetaryNutModel( 0, 0, 0, 0, 0, 5, -8, 0, 0, 0, 0, 0, 0, -14, -39, 0, 0),
12531 new PlanetaryNutModel( 0, 1,-1, 2, 0, 0, -1, 0,-1, 0, 0, 0, 0, 0, -6, -2, 0),
12532 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 0, 0,-1, 0, 0, 0, 0, 4, 15, 8, -2),
12533 new PlanetaryNutModel( 0,-1, 1, 0, 0, 0, 1, 0,-1, 0, 0, 0, 0, 0, 4, 0, 0),
12534 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0, -2, 0, 1, 0, 0, 0, 0, -3, 0, 0, 1),
12535
12536 /* 231-240 */
12537 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -6, 11, 0, 0, 0, 0, 2, 0, 11, 5, 0),
12538 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6,-11, 0, 0, 0, 0, 0, 9, 6, 0, 0),
12539 new PlanetaryNutModel( 0, 0, 0, 0,-1, 0, 4, 0, 0, 0, 0, 0, 2, -4, 10, 4, 2),
12540 new PlanetaryNutModel( 0, 0, 0, 0, 1, 0, -4, 0, 0, 0, 0, 0, 0, 5, 3, 0, 0),
12541 new PlanetaryNutModel( 2, 0,-2, 1, 0, -3, 3, 0, 0, 0, 0, 0, 0, 16, 0, 0, -9),
12542 new PlanetaryNutModel(-2, 0, 2, 0, 0, 0, 2, 0, 0,-2, 0, 0, 0, -3, 0, 0, 0),
12543 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0, -7, 9, 0, 0, 0, 0, 0, 0, 3, 2, -1),
12544 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 4,-5, 0, 0, 2, 7, 0, 0, -3),
12545 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, -25, 22, 0, 0),
12546 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 42, 223, 119, -22),
12547
12548 /* 241-250 */
12549 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0, 2, 0, 0, 0, 0, -27,-143, -77, 14),
12550 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 9, 49, 26, -5),
12551 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2,-1166, 0, 0, 505),
12552 new PlanetaryNutModel( 0, 2,-2, 2, 0, 0, -2, 0, 2, 0, 0, 0, 0, -5, 0, 0, 2),
12553 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 2, -6, 0, 0, 3),
12554 new PlanetaryNutModel( 0, 0, 0, 1, 0, 3, -5, 0, 0, 0, 0, 0, 0, -8, 0, 1, 4),
12555 new PlanetaryNutModel( 0,-1, 1, 0, 0, 3, -4, 0, 0, 0, 0, 0, 0, 0, -4, 0, 0),
12556 new PlanetaryNutModel( 0, 2,-2, 1, 0, -3, 3, 0, 0, 0, 0, 0, 0, 117, 0, 0, -63),
12557 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 2, -4, 0, 0, 0, 0, 0, -4, 8, 4, 2),
12558 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0, -4, 4, 0, 0, 0, 0, 0, 3, 0, 0, -2),
12559
12560 /* 251-260 */
12561 new PlanetaryNutModel( 0, 1,-1, 2, 0, -5, 7, 0, 0, 0, 0, 0, 0, -5, 0, 0, 2),
12562 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, 0, 0, 31, 0, 0),
12563 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -3, 6, 0, 0, 0, 0, 1, -5, 0, 1, 3),
12564 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -4, 6, 0, 0, 0, 0, 0, 4, 0, 0, -2),
12565 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -3, 6, 0, 0, 0, 0, 1, -4, 0, 0, 2),
12566 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -3, 6, 0, 0, 0, 0, 2, -24, -13, -6, 10),
12567 new PlanetaryNutModel( 0,-1, 1, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0),
12568 new PlanetaryNutModel( 0, 0, 0, 1, 0, 2, -3, 0, 0, 0, 0, 0, 0, 0, -32, -17, 0),
12569 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -5, 9, 0, 0, 0, 0, 2, 8, 12, 5, -3),
12570 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -5, 9, 0, 0, 0, 0, 1, 3, 0, 0, -1),
12571
12572 /* 261-270 */
12573 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 5, -9, 0, 0, 0, 0, 0, 7, 13, 0, 0),
12574 new PlanetaryNutModel( 0,-1, 1, 0, 0, 0, 1, 0,-2, 0, 0, 0, 0, -3, 16, 0, 0),
12575 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0, -2, 0, 2, 0, 0, 0, 0, 50, 0, 0, -27),
12576 new PlanetaryNutModel(-2, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -5, -3, 0),
12577 new PlanetaryNutModel( 0,-2, 2, 0, 0, 3, -3, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0),
12578 new PlanetaryNutModel( 0, 0, 0, 0, 0, -6, 10, 0, 0, 0, 0, 0, 1, 0, 5, 3, 1),
12579 new PlanetaryNutModel( 0, 0, 0, 0, 0, -6, 10, 0, 0, 0, 0, 0, 2, 24, 5, 2, -11),
12580 new PlanetaryNutModel( 0, 0, 0, 0, 0, -2, 3, 0, 0, 0, 0, 0, 2, 5, -11, -5, -2),
12581 new PlanetaryNutModel( 0, 0, 0, 0, 0, -2, 3, 0, 0, 0, 0, 0, 1, 30, -3, -2, -16),
12582 new PlanetaryNutModel( 0, 1,-1, 1, 0, -2, 2, 0, 0, 0, 0, 0, 0, 18, 0, 0, -9),
12583
12584 /* 271-280 */
12585 new PlanetaryNutModel( 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0, 0, 8, 614, 0, 0),
12586 new PlanetaryNutModel( 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0, 1, 3, -3, -1, -2),
12587 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1, 6, 17, 9, -3),
12588 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0, 3, 0, 0, 0, 0, -3, -9, -5, 2),
12589 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1, 0, 6, 3, -1),
12590 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 2, -127, 21, 9, 55),
12591 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, -8, 0, 0, 0, 0, 0, 3, 5, 0, 0),
12592 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -4, 8, 0, 0, 0, 0, 2, -6, -10, -4, 3),
12593 new PlanetaryNutModel( 0,-2, 2, 0, 0, 0, 2, 0,-2, 0, 0, 0, 0, 5, 0, 0, 0),
12594 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -4, 7, 0, 0, 0, 0, 2, 16, 9, 4, -7),
12595
12596 /* 281-290 */
12597 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -4, 7, 0, 0, 0, 0, 1, 3, 0, 0, -2),
12598 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, -7, 0, 0, 0, 0, 0, 0, 22, 0, 0),
12599 new PlanetaryNutModel( 0, 0, 0, 1, 0, -2, 3, 0, 0, 0, 0, 0, 0, 0, 19, 10, 0),
12600 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0, -2, 0, 3, 0, 0, 0, 0, 7, 0, 0, -4),
12601 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -5, 10, 0, 0, 0, 0, 2, 0, -5, -2, 0),
12602 new PlanetaryNutModel( 0, 0, 0, 1, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0),
12603 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 2, -9, 3, 1, 4),
12604 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -3, 5, 0, 0, 0, 0, 2, 17, 0, 0, -7),
12605 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -3, 5, 0, 0, 0, 0, 1, 0, -3, -2, -1),
12606 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, -20, 34, 0, 0),
12607
12608 /* 291-300 */
12609 new PlanetaryNutModel( 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, 1, -10, 0, 1, 5),
12610 new PlanetaryNutModel( 0, 1,-1, 1, 0, 1, -3, 0, 0, 0, 0, 0, 0, -4, 0, 0, 2),
12611 new PlanetaryNutModel( 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, 0, 22, -87, 0, 0),
12612 new PlanetaryNutModel( 0, 0, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 1, -4, 0, 0, 2),
12613 new PlanetaryNutModel( 0, 0, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 2, -3, -6, -2, 1),
12614 new PlanetaryNutModel( 0, 0, 0, 0, 0, -7, 11, 0, 0, 0, 0, 0, 2, -16, -3, -1, 7),
12615 new PlanetaryNutModel( 0, 0, 0, 0, 0, -7, 11, 0, 0, 0, 0, 0, 1, 0, -3, -2, 0),
12616 new PlanetaryNutModel( 0,-2, 2, 0, 0, 4, -4, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0),
12617 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0, -68, 39, 0, 0),
12618 new PlanetaryNutModel( 0, 2,-2, 1, 0, -4, 4, 0, 0, 0, 0, 0, 0, 27, 0, 0, -14),
12619
12620 /* 301-310 */
12621 new PlanetaryNutModel( 0,-1, 1, 0, 0, 4, -5, 0, 0, 0, 0, 0, 0, 0, -4, 0, 0),
12622 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, -25, 0, 0, 0),
12623 new PlanetaryNutModel( 0, 0, 0, 0, 0, -4, 7, 0, 0, 0, 0, 0, 1, -12, -3, -2, 6),
12624 new PlanetaryNutModel( 0, 1,-1, 1, 0, -4, 6, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1),
12625 new PlanetaryNutModel( 0, 0, 0, 0, 0, -4, 7, 0, 0, 0, 0, 0, 2, 3, 66, 29, -1),
12626 new PlanetaryNutModel( 0, 0, 0, 0, 0, -4, 6, 0, 0, 0, 0, 0, 2, 490, 0, 0,-213),
12627 new PlanetaryNutModel( 0, 0, 0, 0, 0, -4, 6, 0, 0, 0, 0, 0, 1, -22, 93, 49, 12),
12628 new PlanetaryNutModel( 0, 1,-1, 1, 0, -4, 5, 0, 0, 0, 0, 0, 0, -7, 28, 15, 4),
12629 new PlanetaryNutModel( 0, 0, 0, 0, 0, -4, 6, 0, 0, 0, 0, 0, 1, -3, 13, 7, 2),
12630 new PlanetaryNutModel( 0, 0, 0, 0, 0, 4, -6, 0, 0, 0, 0, 0, 0, -46, 14, 0, 0),
12631
12632 /* 311-320 */
12633 new PlanetaryNutModel(-2, 0, 2, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, -5, 0, 0, 0),
12634 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 1, 0, 0),
12635 new PlanetaryNutModel( 0,-1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0),
12636 new PlanetaryNutModel( 0, 0, 0, 1, 0, 1, -1, 0, 0, 0, 0, 0, 0, -28, 0, 0, 15),
12637 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -1, 0, 5, 0, 0, 0, 2, 5, 0, 0, -2),
12638 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, -3, 0, 0, 0, 0, 0, 0, 3, 0, 0),
12639 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -1, 3, 0, 0, 0, 0, 2, -11, 0, 0, 5),
12640 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -7, 12, 0, 0, 0, 0, 2, 0, 3, 1, 0),
12641 new PlanetaryNutModel( 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 2, -3, 0, 0, 1),
12642 new PlanetaryNutModel( 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 1, 25, 106, 57, -13),
12643
12644 /* 321-330 */
12645 new PlanetaryNutModel( 0, 1,-1, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 5, 21, 11, -3),
12646 new PlanetaryNutModel( 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 1485, 0, 0, 0),
12647 new PlanetaryNutModel( 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 1, -7, -32, -17, 4),
12648 new PlanetaryNutModel( 0, 1,-1, 1, 0, 1, -2, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0),
12649 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -2, 5, 0, 0, 0, 0, 2, -6, -3, -2, 3),
12650 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -1, 0, 4, 0, 0, 0, 2, 30, -6, -2, -13),
12651 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0,-4, 0, 0, 0, 0, -4, 4, 0, 0),
12652 new PlanetaryNutModel( 0, 0, 0, 1, 0, -1, 1, 0, 0, 0, 0, 0, 0, -19, 0, 0, 10),
12653 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -6, 10, 0, 0, 0, 0, 2, 0, 4, 2, -1),
12654 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -6, 10, 0, 0, 0, 0, 0, 0, 3, 0, 0),
12655
12656 /* 331-340 */
12657 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0, -3, 0, 3, 0, 0, 0, 0, 4, 0, 0, -2),
12658 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -3, 7, 0, 0, 0, 0, 2, 0, -3, -1, 0),
12659 new PlanetaryNutModel(-2, 0, 2, 0, 0, 4, -4, 0, 0, 0, 0, 0, 0, -3, 0, 0, 0),
12660 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -5, 8, 0, 0, 0, 0, 2, 5, 3, 1, -2),
12661 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 5, -8, 0, 0, 0, 0, 0, 0, 11, 0, 0),
12662 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -1, 0, 3, 0, 0, 0, 2, 118, 0, 0, -52),
12663 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -1, 0, 3, 0, 0, 0, 1, 0, -5, -3, 0),
12664 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0,-3, 0, 0, 0, 0, -28, 36, 0, 0),
12665 new PlanetaryNutModel( 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 0, 0, 5, -5, 0, 0),
12666 new PlanetaryNutModel( 0, 0, 0, 0, 0, -2, 4, 0, 0, 0, 0, 0, 1, 14, -59, -31, -8),
12667
12668 /* 341-350 */
12669 new PlanetaryNutModel( 0, 1,-1, 1, 0, -2, 3, 0, 0, 0, 0, 0, 0, 0, 9, 5, 1),
12670 new PlanetaryNutModel( 0, 0, 0, 0, 0, -2, 4, 0, 0, 0, 0, 0, 2, -458, 0, 0, 198),
12671 new PlanetaryNutModel( 0, 0, 0, 0, 0, -6, 9, 0, 0, 0, 0, 0, 2, 0, -45, -20, 0),
12672 new PlanetaryNutModel( 0, 0, 0, 0, 0, -6, 9, 0, 0, 0, 0, 0, 1, 9, 0, 0, -5),
12673 new PlanetaryNutModel( 0, 0, 0, 0, 0, 6, -9, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0),
12674 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 1, 0,-2, 0, 0, 0, 0, 0, -4, -2, -1),
12675 new PlanetaryNutModel( 0, 2,-2, 1, 0, -2, 2, 0, 0, 0, 0, 0, 0, 11, 0, 0, -6),
12676 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -4, 6, 0, 0, 0, 0, 2, 6, 0, 0, -2),
12677 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, -6, 0, 0, 0, 0, 0, -16, 23, 0, 0),
12678 new PlanetaryNutModel( 0, 0, 0, 1, 0, 3, -4, 0, 0, 0, 0, 0, 0, 0, -4, -2, 0),
12679
12680 /* 351-360 */
12681 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -1, 0, 2, 0, 0, 0, 2, -5, 0, 0, 2),
12682 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0,-2, 0, 0, 0, 0, -166, 269, 0, 0),
12683 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 1, 0,-1, 0, 0, 0, 0, 15, 0, 0, -8),
12684 new PlanetaryNutModel( 0, 0, 0, 0, 0, -5, 9, 0, 0, 0, 0, 0, 2, 10, 0, 0, -4),
12685 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, -78, 45, 0, 0),
12686 new PlanetaryNutModel( 0, 0, 0, 0, 0, -3, 4, 0, 0, 0, 0, 0, 2, 0, -5, -2, 0),
12687 new PlanetaryNutModel( 0, 0, 0, 0, 0, -3, 4, 0, 0, 0, 0, 0, 1, 7, 0, 0, -4),
12688 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, 0, -5, 328, 0, 0),
12689 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, 1, 3, 0, 0, -2),
12690 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 2, -2, 0, 0, 0, 0, 0, 5, 0, 0, -2),
12691
12692 /* 361-370 */
12693 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, -1, 0, 2, 0, 0, 0, 0, 0, 3, 1, 0),
12694 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0, 0,-3, 0, 0, 0, -3, 0, 0, 0),
12695 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0, 1,-5, 0, 0, 0, -3, 0, 0, 0),
12696 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 1, 0, -4, -2, 0),
12697 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0,-1, 0, 0, 0, 0,-1223, -26, 0, 0),
12698 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0,-1, 0, 0, 0, 1, 0, 7, 3, 0),
12699 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0,-3, 5, 0, 0, 0, 3, 0, 0, 0),
12700 new PlanetaryNutModel( 0, 0, 0, 1, 0, -3, 4, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0),
12701 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0, 0,-2, 0, 0, 0, -6, 20, 0, 0),
12702 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, -368, 0, 0, 0),
12703
12704 /* 371-380 */
12705 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0, 0,-1, 0, 0, 0, -75, 0, 0, 0),
12706 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0, 11, 0, 0, -6),
12707 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, -2, 2, 0, 0, 0, 0, 0, 3, 0, 0, -2),
12708 new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 14, 0, 0, 0, 0, 0, 2, -3, 0, 0, 1),
12709 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0, 2,-5, 0, 0, 0, -13, -30, 0, 0),
12710 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 5, -8, 3, 0, 0, 0, 0, 21, 3, 0, 0),
12711 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 5, -8, 3, 0, 0, 0, 2, -3, 0, 0, 1),
12712 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1, -4, 0, 0, 2),
12713 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 8, -27, 0, 0),
12714 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, -8, 3, 0, 0, 0, 0, -19, -11, 0, 0),
12715
12716 /* 381-390 */
12717 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -3, 8,-3, 0, 0, 0, 2, -4, 0, 0, 2),
12718 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0,-2, 5, 0, 0, 2, 0, 5, 2, 0),
12719 new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 12, 0, 0, 0, 0, 0, 2, -6, 0, 0, 2),
12720 new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 12, 0, 0, 0, 0, 0, 0, -8, 0, 0, 0),
12721 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0, 1,-2, 0, 0, 0, -1, 0, 0, 0),
12722 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 2, -14, 0, 0, 6),
12723 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 6, 0, 0, 0),
12724 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, -74, 0, 0, 32),
12725 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 2, 0, -3, -1, 0),
12726 new PlanetaryNutModel( 0, 2,-2, 1, 0, -5, 5, 0, 0, 0, 0, 0, 0, 4, 0, 0, -2),
12727
12728 /* 391-400 */
12729 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 8, 11, 0, 0),
12730 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 3, 2, 0),
12731 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2, -262, 0, 0, 114),
12732 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, 0, 0, 0, -4, 0, 0),
12733 new PlanetaryNutModel( 0, 0, 0, 0, 0, -3, 6, 0, 0, 0, 0, 0, 1, -7, 0, 0, 4),
12734 new PlanetaryNutModel( 0, 0, 0, 0, 0, -3, 6, 0, 0, 0, 0, 0, 2, 0, -27, -12, 0),
12735 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -1, 4, 0, 0, 0, 0, 2, -19, -8, -4, 8),
12736 new PlanetaryNutModel( 0, 0, 0, 0, 0, -5, 7, 0, 0, 0, 0, 0, 2, 202, 0, 0, -87),
12737 new PlanetaryNutModel( 0, 0, 0, 0, 0, -5, 7, 0, 0, 0, 0, 0, 1, -8, 35, 19, 5),
12738 new PlanetaryNutModel( 0, 1,-1, 1, 0, -5, 6, 0, 0, 0, 0, 0, 0, 0, 4, 2, 0),
12739
12740 /* 401-410 */
12741 new PlanetaryNutModel( 0, 0, 0, 0, 0, 5, -7, 0, 0, 0, 0, 0, 0, 16, -5, 0, 0),
12742 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0, 5, 0, 0, -3),
12743 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0, 0, -3, 0, 0),
12744 new PlanetaryNutModel( 0, 0, 0, 0,-1, 0, 3, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0),
12745 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 2, -35, -48, -21, 15),
12746 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -2, 6, 0, 0, 0, 0, 2, -3, -5, -2, 1),
12747 new PlanetaryNutModel( 0, 0, 0, 1, 0, 2, -2, 0, 0, 0, 0, 0, 0, 6, 0, 0, -3),
12748 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -6, 9, 0, 0, 0, 0, 2, 3, 0, 0, -1),
12749 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, -9, 0, 0, 0, 0, 0, 0, -5, 0, 0),
12750 new PlanetaryNutModel( 0, 0, 0, 0, 0, -2, 2, 0, 0, 0, 0, 0, 1, 12, 55, 29, -6),
12751
12752 /* 411-420 */
12753 new PlanetaryNutModel( 0, 1,-1, 1, 0, -2, 1, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0),
12754 new PlanetaryNutModel( 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, -598, 0, 0, 0),
12755 new PlanetaryNutModel( 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, 1, -3, -13, -7, 1),
12756 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 2, -5, -7, -3, 2),
12757 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -5, 7, 0, 0, 0, 0, 2, 3, 0, 0, -1),
12758 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 5, -7, 0, 0, 0, 0, 0, 5, -7, 0, 0),
12759 new PlanetaryNutModel( 0, 0, 0, 1, 0, -2, 2, 0, 0, 0, 0, 0, 0, 4, 0, 0, -2),
12760 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, -5, 0, 0, 0, 0, 0, 16, -6, 0, 0),
12761 new PlanetaryNutModel( 0, 0, 0, 0, 0, 1, -3, 0, 0, 0, 0, 0, 0, 8, -3, 0, 0),
12762 new PlanetaryNutModel( 0, 0, 0, 0, 0, -1, 3, 0, 0, 0, 0, 0, 1, 8, -31, -16, -4),
12763
12764 /* 421-430 */
12765 new PlanetaryNutModel( 0, 1,-1, 1, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0),
12766 new PlanetaryNutModel( 0, 0, 0, 0, 0, -1, 3, 0, 0, 0, 0, 0, 2, 113, 0, 0, -49),
12767 new PlanetaryNutModel( 0, 0, 0, 0, 0, -7, 10, 0, 0, 0, 0, 0, 2, 0, -24, -10, 0),
12768 new PlanetaryNutModel( 0, 0, 0, 0, 0, -7, 10, 0, 0, 0, 0, 0, 1, 4, 0, 0, -2),
12769 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 27, 0, 0, 0),
12770 new PlanetaryNutModel( 0, 0, 0, 0, 0, -4, 8, 0, 0, 0, 0, 0, 2, -3, 0, 0, 1),
12771 new PlanetaryNutModel( 0, 0, 0, 0, 0, -4, 5, 0, 0, 0, 0, 0, 2, 0, -4, -2, 0),
12772 new PlanetaryNutModel( 0, 0, 0, 0, 0, -4, 5, 0, 0, 0, 0, 0, 1, 5, 0, 0, -2),
12773 new PlanetaryNutModel( 0, 0, 0, 0, 0, 4, -5, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0),
12774 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 2, -13, 0, 0, 6),
12775
12776 /* 431-440 */
12777 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -2, 0, 5, 0, 0, 0, 2, 5, 0, 0, -2),
12778 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 2, -18, -10, -4, 8),
12779 new PlanetaryNutModel( 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -4, -28, 0, 0),
12780 new PlanetaryNutModel( 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, -5, 6, 3, 2),
12781 new PlanetaryNutModel( 0, 0, 0, 0, 0, -9, 13, 0, 0, 0, 0, 0, 2, -3, 0, 0, 1),
12782 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -1, 5, 0, 0, 0, 0, 2, -5, -9, -4, 2),
12783 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -2, 0, 4, 0, 0, 0, 2, 17, 0, 0, -7),
12784 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0,-4, 0, 0, 0, 0, 11, 4, 0, 0),
12785 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -2, 7, 0, 0, 0, 0, 2, 0, -6, -2, 0),
12786 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0,-3, 0, 0, 0, 0, 83, 15, 0, 0),
12787
12788 /* 441-450 */
12789 new PlanetaryNutModel( 0, 0, 0, 0, 0, -2, 5, 0, 0, 0, 0, 0, 1, -4, 0, 0, 2),
12790 new PlanetaryNutModel( 0, 0, 0, 0, 0, -2, 5, 0, 0, 0, 0, 0, 2, 0,-114, -49, 0),
12791 new PlanetaryNutModel( 0, 0, 0, 0, 0, -6, 8, 0, 0, 0, 0, 0, 2, 117, 0, 0, -51),
12792 new PlanetaryNutModel( 0, 0, 0, 0, 0, -6, 8, 0, 0, 0, 0, 0, 1, -5, 19, 10, 2),
12793 new PlanetaryNutModel( 0, 0, 0, 0, 0, 6, -8, 0, 0, 0, 0, 0, 0, -3, 0, 0, 0),
12794 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 2, 0,-2, 0, 0, 0, 0, -3, 0, 0, 2),
12795 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -3, 9, 0, 0, 0, 0, 2, 0, -3, -1, 0),
12796 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, 3, 0, 0, 0),
12797 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 2, 0, -6, -2, 0),
12798 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0,-2, 0, 0, 0, 0, 393, 3, 0, 0),
12799
12800 /* 451-460 */
12801 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0,-2, 0, 0, 0, 1, -4, 21, 11, 2),
12802 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0,-2, 0, 0, 0, 2, -6, 0, -1, 3),
12803 new PlanetaryNutModel( 0, 0, 0, 0, 0, -5, 10, 0, 0, 0, 0, 0, 2, -3, 8, 4, 1),
12804 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, 8, 0, 0, 0),
12805 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 2, 18, -29, -13, -8),
12806 new PlanetaryNutModel( 0, 0, 0, 0, 0, -3, 3, 0, 0, 0, 0, 0, 1, 8, 34, 18, -4),
12807 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 0, 89, 0, 0, 0),
12808 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 1, 3, 12, 6, -1),
12809 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 2, 54, -15, -7, -24),
12810 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0, 0,-3, 0, 0, 0, 0, 3, 0, 0),
12811
12812 /* 461-470 */
12813 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -5, 13, 0, 0, 0, 0, 2, 3, 0, 0, -1),
12814 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0,-1, 0, 0, 0, 0, 0, 35, 0, 0),
12815 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0,-1, 0, 0, 0, 2, -154, -30, -13, 67),
12816 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0, 0,-2, 0, 0, 0, 15, 0, 0, 0),
12817 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0, 0,-2, 0, 0, 1, 0, 4, 2, 0),
12818 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 0, 0, 9, 0, 0),
12819 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 2, 80, -71, -31, -35),
12820 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0, 0,-1, 0, 0, 2, 0, -20, -9, 0),
12821 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -6, 15, 0, 0, 0, 0, 2, 11, 5, 2, -5),
12822 new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 15, 0, 0, 0, 0, 0, 2, 61, -96, -42, -27),
12823
12824 /* 471-480 */
12825 new PlanetaryNutModel( 0, 0, 0, 0, 0, -3, 9, -4, 0, 0, 0, 0, 2, 14, 9, 4, -6),
12826 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0, 2,-5, 0, 0, 2, -11, -6, -3, 5),
12827 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -2, 8,-1,-5, 0, 0, 2, 0, -3, -1, 0),
12828 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, -8, 3, 0, 0, 0, 2, 123,-415, -180, -53),
12829 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, -35),
12830 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, -5, 0, 0, 0),
12831 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 7, -32, -17, -4),
12832 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -9, -5, 0),
12833 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, -4, 2, 0),
12834 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, -89, 0, 0, 38),
12835
12836 /* 481-490 */
12837 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -6, 16,-4,-5, 0, 0, 2, 0, -86, -19, -6),
12838 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -2, 8,-3, 0, 0, 0, 2, 0, 0, -19, 6),
12839 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -2, 8,-3, 0, 0, 0, 2, -123,-416, -180, 53),
12840 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, -8, 1, 5, 0, 0, 2, 0, -3, -1, 0),
12841 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0,-2, 5, 0, 0, 2, 12, -6, -3, -5),
12842 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -5, 4, 0, 0, 0, 0, 2, -13, 9, 4, 6),
12843 new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 11, 0, 0, 0, 0, 0, 2, 0, -15, -7, 0),
12844 new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 11, 0, 0, 0, 0, 0, 1, 3, 0, 0, -1),
12845 new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 11, 0, 0, 0, 0, 0, 2, -62, -97, -42, 27),
12846 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 2, -11, 5, 2, 5),
12847
12848 /* 491-500 */
12849 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 2, 0, -19, -8, 0),
12850 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -3, 0, 2, 0, 0, 0, 2, -3, 0, 0, 1),
12851 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, 4, 2, 0),
12852 new PlanetaryNutModel( 0, 1,-1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0),
12853 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0, -4, 8,-3, 0, 0, 0, 0, 0, 4, 2, 0),
12854 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 2, -85, -70, -31, 37),
12855 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 163, -12, -5, -72),
12856 new PlanetaryNutModel( 0, 0, 0, 0, 0, -3, 7, 0, 0, 0, 0, 0, 2, -63, -16, -7, 28),
12857 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 2, -21, -32, -14, 9),
12858 new PlanetaryNutModel( 0, 0, 0, 0, 0, -5, 6, 0, 0, 0, 0, 0, 2, 0, -3, -1, 0),
12859
12860 /* 501-510 */
12861 new PlanetaryNutModel( 0, 0, 0, 0, 0, -5, 6, 0, 0, 0, 0, 0, 1, 3, 0, 0, -2),
12862 new PlanetaryNutModel( 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0),
12863 new PlanetaryNutModel( 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, 2, 3, 10, 4, -1),
12864 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2, 3, 0, 0, -1),
12865 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -1, 6, 0, 0, 0, 0, 2, 0, -7, -3, 0),
12866 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 7, -9, 0, 0, 0, 0, 2, 0, -4, -2, 0),
12867 new PlanetaryNutModel( 0, 0, 0, 0, 0, 2, -1, 0, 0, 0, 0, 0, 0, 6, 19, 0, 0),
12868 new PlanetaryNutModel( 0, 0, 0, 0, 0, 2, -1, 0, 0, 0, 0, 0, 2, 5,-173, -75, -2),
12869 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, -7, 0, 0, 0, 0, 2, 0, -7, -3, 0),
12870 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 2, 7, -12, -5, -3),
12871
12872 /* 511-520 */
12873 new PlanetaryNutModel( 0, 0, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 1, -3, 0, 0, 2),
12874 new PlanetaryNutModel( 0, 0, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 2, 3, -4, -2, -1),
12875 new PlanetaryNutModel( 0, 0, 0, 0, 0, -7, 9, 0, 0, 0, 0, 0, 2, 74, 0, 0, -32),
12876 new PlanetaryNutModel( 0, 0, 0, 0, 0, -7, 9, 0, 0, 0, 0, 0, 1, -3, 12, 6, 2),
12877 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, -3, 0, 0, 0, 0, 2, 26, -14, -6, -11),
12878 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 2, 19, 0, 0, -8),
12879 new PlanetaryNutModel( 0, 0, 0, 0, 0, -4, 4, 0, 0, 0, 0, 0, 1, 6, 24, 13, -3),
12880 new PlanetaryNutModel( 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, 0, 83, 0, 0, 0),
12881 new PlanetaryNutModel( 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, 1, 0, -10, -5, 0),
12882 new PlanetaryNutModel( 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, 2, 11, -3, -1, -5),
12883
12884 /* 521-530 */
12885 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 2, 3, 0, 1, -1),
12886 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -3, 0, 5, 0, 0, 0, 2, 3, 0, 0, -1),
12887 new PlanetaryNutModel( 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, -4, 0, 0, 0),
12888 new PlanetaryNutModel( 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 5, -23, -12, -3),
12889 new PlanetaryNutModel( 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 2, -339, 0, 0, 147),
12890 new PlanetaryNutModel( 0, 0, 0, 0, 0, -9, 12, 0, 0, 0, 0, 0, 2, 0, -10, -5, 0),
12891 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, 0,-4, 0, 0, 0, 0, 5, 0, 0, 0),
12892 new PlanetaryNutModel( 0, 2,-2, 1, 0, 1, -1, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1),
12893 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 7, -8, 0, 0, 0, 0, 2, 0, -4, -2, 0),
12894 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, 0,-3, 0, 0, 0, 0, 18, -3, 0, 0),
12895
12896 /* 531-540 */
12897 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, 0,-3, 0, 0, 0, 2, 9, -11, -5, -4),
12898 new PlanetaryNutModel( 0, 0, 0, 0, 0, -2, 6, 0, 0, 0, 0, 0, 2, -8, 0, 0, 4),
12899 new PlanetaryNutModel( 0, 0, 0, 0, 0, -6, 7, 0, 0, 0, 0, 0, 1, 3, 0, 0, -1),
12900 new PlanetaryNutModel( 0, 0, 0, 0, 0, 6, -7, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0),
12901 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, -6, 0, 0, 0, 0, 2, 6, -9, -4, -2),
12902 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, 0,-2, 0, 0, 0, 0, -4, -12, 0, 0),
12903 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, 0,-2, 0, 0, 0, 2, 67, -91, -39, -29),
12904 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 5, -4, 0, 0, 0, 0, 2, 30, -18, -8, -13),
12905 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
12906 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 0, 2, 0,-114, -50, 0),
12907
12908 /* 541-550 */
12909 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, 0,-1, 0, 0, 0, 2, 0, 0, 0, 23),
12910 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, 0,-1, 0, 0, 0, 2, 517, 16, 7,-224),
12911 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, 0, 0,-2, 0, 0, 2, 0, -7, -3, 0),
12912 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 2, 143, -3, -1, -62),
12913 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, 0, 0,-1, 0, 0, 2, 29, 0, 0, -13),
12914 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0, 1, 0,-1, 0, 0, 0, 0, -4, 0, 0, 2),
12915 new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 16, 0, 0, 0, 0, 0, 2, -6, 0, 0, 3),
12916 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, 0, 2,-5, 0, 0, 2, 5, 12, 5, -2),
12917 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 7, -8, 3, 0, 0, 0, 2, -25, 0, 0, 11),
12918 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -5, 16,-4,-5, 0, 0, 2, -3, 0, 0, 1),
12919
12920 /* 551-560 */
12921 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 2, 0, 4, 2, 0),
12922 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -1, 8,-3, 0, 0, 0, 2, -22, 12, 5, 10),
12923 new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 10, 0, 0, 0, 0, 0, 2, 50, 0, 0, -22),
12924 new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 10, 0, 0, 0, 0, 0, 1, 0, 7, 4, 0),
12925 new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 10, 0, 0, 0, 0, 0, 2, 0, 3, 1, 0),
12926 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 2, -4, 4, 2, 2),
12927 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, 0, 1, 0, 0, 0, 2, -5, -11, -5, 2),
12928 new PlanetaryNutModel( 0, 0, 0, 0, 0, -3, 8, 0, 0, 0, 0, 0, 2, 0, 4, 2, 0),
12929 new PlanetaryNutModel( 0, 0, 0, 0, 0, -5, 5, 0, 0, 0, 0, 0, 1, 4, 17, 9, -2),
12930 new PlanetaryNutModel( 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 0, 0, 59, 0, 0, 0),
12931
12932 /* 561-570 */
12933 new PlanetaryNutModel( 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 0, 1, 0, -4, -2, 0),
12934 new PlanetaryNutModel( 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 0, 2, -8, 0, 0, 4),
12935 new PlanetaryNutModel( 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0, 0),
12936 new PlanetaryNutModel( 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 4, -15, -8, -2),
12937 new PlanetaryNutModel( 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 370, -8, 0,-160),
12938 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 7, -7, 0, 0, 0, 0, 2, 0, 0, -3, 0),
12939 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 7, -7, 0, 0, 0, 0, 2, 0, 3, 1, 0),
12940 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, -5, 0, 0, 0, 0, 2, -6, 3, 1, 3),
12941 new PlanetaryNutModel( 0, 0, 0, 0, 0, 7, -8, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0),
12942 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 5, -3, 0, 0, 0, 0, 2, -10, 0, 0, 4),
12943
12944 /* 571-580 */
12945 new PlanetaryNutModel( 0, 0, 0, 0, 0, 4, -3, 0, 0, 0, 0, 0, 2, 0, 9, 4, 0),
12946 new PlanetaryNutModel( 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 2, 4, 17, 7, -2),
12947 new PlanetaryNutModel( 0, 0, 0, 0, 0, -9, 11, 0, 0, 0, 0, 0, 2, 34, 0, 0, -15),
12948 new PlanetaryNutModel( 0, 0, 0, 0, 0, -9, 11, 0, 0, 0, 0, 0, 1, 0, 5, 3, 0),
12949 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, 0,-4, 0, 0, 0, 2, -5, 0, 0, 2),
12950 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, 0,-3, 0, 0, 0, 2, -37, -7, -3, 16),
12951 new PlanetaryNutModel( 0, 0, 0, 0, 0, -6, 6, 0, 0, 0, 0, 0, 1, 3, 13, 7, -2),
12952 new PlanetaryNutModel( 0, 0, 0, 0, 0, 6, -6, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0),
12953 new PlanetaryNutModel( 0, 0, 0, 0, 0, 6, -6, 0, 0, 0, 0, 0, 1, 0, -3, -2, 0),
12954 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, 0,-2, 0, 0, 0, 2, -184, -3, -1, 80),
12955
12956 /* 581-590 */
12957 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, -4, 0, 0, 0, 0, 2, -3, 0, 0, 1),
12958 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 0, 0, -3, 0, 0, 0),
12959 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 0, 1, 0, -10, -6, -1),
12960 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 0, 2, 31, -6, 0, -13),
12961 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, 0,-1, 0, 0, 0, 2, -3, -32, -14, 1),
12962 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, 0, 0,-2, 0, 0, 2, -7, 0, 0, 3),
12963 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 5, -2, 0, 0, 0, 0, 2, 0, -8, -4, 0),
12964 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 3, -4, 0, 0),
12965 new PlanetaryNutModel( 0, 0, 0, 0, 0, 8, -9, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0),
12966 new PlanetaryNutModel( 0, 0, 0, 0, 0, 5, -4, 0, 0, 0, 0, 0, 2, 0, 3, 1, 0),
12967
12968 /* 591-600 */
12969 new PlanetaryNutModel( 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 2, 19, -23, -10, 2),
12970 new PlanetaryNutModel( 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, -10),
12971 new PlanetaryNutModel( 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 1, 0, 3, 2, 0),
12972 new PlanetaryNutModel( 0, 0, 0, 0, 0, -7, 7, 0, 0, 0, 0, 0, 1, 0, 9, 5, -1),
12973 new PlanetaryNutModel( 0, 0, 0, 0, 0, 7, -7, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0),
12974 new PlanetaryNutModel( 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 0, 1, 0, -7, -4, 0),
12975 new PlanetaryNutModel( 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 0, 2, 8, -4, 0, -4),
12976 new PlanetaryNutModel( 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0),
12977 new PlanetaryNutModel( 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0),
12978 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 5, 0,-4, 0, 0, 0, 2, -3, 0, 0, 1),
12979
12980 /* 601-610 */
12981 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 5, 0,-3, 0, 0, 0, 2, -9, 0, 1, 4),
12982 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 5, 0,-2, 0, 0, 0, 2, 3, 12, 5, -1),
12983 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 2, 17, -3, -1, 0),
12984 new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 8, 0, 0, 0, 0, 0, 1, 0, 7, 4, 0),
12985 new PlanetaryNutModel( 0, 0, 0, 0, 0, 8, -8, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0),
12986 new PlanetaryNutModel( 0, 0, 0, 0, 0, 5, -3, 0, 0, 0, 0, 0, 1, 0, -5, -3, 0),
12987 new PlanetaryNutModel( 0, 0, 0, 0, 0, 5, -3, 0, 0, 0, 0, 0, 2, 14, -3, 0, -1),
12988 new PlanetaryNutModel( 0, 0, 0, 0, 0, -9, 9, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0),
12989 new PlanetaryNutModel( 0, 0, 0, 0, 0, -9, 9, 0, 0, 0, 0, 0, 1, 0, 0, 0, -5),
12990 new PlanetaryNutModel( 0, 0, 0, 0, 0, -9, 9, 0, 0, 0, 0, 0, 1, 0, 5, 3, 0),
12991
12992 /* 611-620 */
12993 new PlanetaryNutModel( 0, 0, 0, 0, 0, 9, -9, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0),
12994 new PlanetaryNutModel( 0, 0, 0, 0, 0, 6, -4, 0, 0, 0, 0, 0, 1, 0, -3, -2, 0),
12995 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 2, 2, 9, 4, 3),
12996 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4),
12997 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0),
12998 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 1, 0, 4, 2, 0),
12999 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 2, 6, 0, 0, -3),
13000 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0),
13001 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 1, 0, 3, 1, 0),
13002 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 2, 5, 0, 0, -2),
13003
13004 /* 621-630 */
13005 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, -1),
13006 new PlanetaryNutModel( 1, 0,-2, 0, 0, 0, 2, 0,-2, 0, 0, 0, 0, -3, 0, 0, 0),
13007 new PlanetaryNutModel( 1, 0,-2, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0),
13008 new PlanetaryNutModel( 1, 0,-2, 0, 0, 0, 1, 0,-1, 0, 0, 0, 0, 7, 0, 0, 0),
13009 new PlanetaryNutModel( 1, 0,-2, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, -4, 0, 0, 0),
13010 new PlanetaryNutModel(-1, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0),
13011 new PlanetaryNutModel(-1, 0, 0, 0, 0, 0, 2, 0,-2, 0, 0, 0, 0, 6, 0, 0, 0),
13012 new PlanetaryNutModel(-1, 0, 2, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, -4, 0, 0),
13013 new PlanetaryNutModel( 1, 0,-2, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, -4, 0, 0),
13014 new PlanetaryNutModel(-2, 0, 2, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0, 5, 0, 0, 0),
13015
13016 /* 631-640 */
13017 new PlanetaryNutModel(-1, 0, 0, 0, 0, 0, 2, 0,-3, 0, 0, 0, 0, -3, 0, 0, 0),
13018 new PlanetaryNutModel(-1, 0, 0, 0, 0, 0, 1, 0,-1, 0, 0, 0, 0, 4, 0, 0, 0),
13019 new PlanetaryNutModel(-1, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, -5, 0, 0, 0),
13020 new PlanetaryNutModel(-1, 0, 2, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0),
13021 new PlanetaryNutModel( 1,-1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0),
13022 new PlanetaryNutModel(-1, 0, 2, 0, 0, 0, 2, 0,-3, 0, 0, 0, 0, 13, 0, 0, 0),
13023 new PlanetaryNutModel(-2, 0, 0, 0, 0, 0, 2, 0,-3, 0, 0, 0, 0, 21, 11, 0, 0),
13024 new PlanetaryNutModel( 1, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, -5, 0, 0),
13025 new PlanetaryNutModel(-1, 1,-1, 1, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, -5, -2, 0),
13026 new PlanetaryNutModel( 1, 1,-1, 1, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0),
13027
13028 /* 641-650 */
13029 new PlanetaryNutModel(-1, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, -5, 0, 0),
13030 new PlanetaryNutModel(-1, 0, 2, 1, 0, 0, 2, 0,-2, 0, 0, 0, 0, -3, 0, 0, 2),
13031 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0,-2, 0, 0, 0, 0, 20, 10, 0, 0),
13032 new PlanetaryNutModel(-1, 0, 2, 0, 0, 0, 2, 0,-2, 0, 0, 0, 0, -34, 0, 0, 0),
13033 new PlanetaryNutModel(-1, 0, 2, 0, 0, 3, -3, 0, 0, 0, 0, 0, 0, -19, 0, 0, 0),
13034 new PlanetaryNutModel( 1, 0,-2, 1, 0, 0, -2, 0, 2, 0, 0, 0, 0, 3, 0, 0, -2),
13035 new PlanetaryNutModel( 1, 2,-2, 2, 0, -3, 3, 0, 0, 0, 0, 0, 0, -3, 0, 0, 1),
13036 new PlanetaryNutModel( 1, 2,-2, 2, 0, 0, -2, 0, 2, 0, 0, 0, 0, -6, 0, 0, 3),
13037 new PlanetaryNutModel( 1, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, -4, 0, 0, 0),
13038 new PlanetaryNutModel( 1, 0, 0, 0, 0, 0, 1, 0,-1, 0, 0, 0, 0, 3, 0, 0, 0),
13039
13040 /* 651-660 */
13041 new PlanetaryNutModel( 0, 0,-2, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0),
13042 new PlanetaryNutModel( 0, 0,-2, 0, 0, 0, 1, 0,-1, 0, 0, 0, 0, 4, 0, 0, 0),
13043 new PlanetaryNutModel( 0, 2, 0, 2, 0, -2, 2, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1),
13044 new PlanetaryNutModel( 0, 2, 0, 2, 0, 0, -1, 0, 1, 0, 0, 0, 0, 6, 0, 0, -3),
13045 new PlanetaryNutModel( 0, 2, 0, 2, 0, -1, 1, 0, 0, 0, 0, 0, 0, -8, 0, 0, 3),
13046 new PlanetaryNutModel( 0, 2, 0, 2, 0, -2, 3, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0),
13047 new PlanetaryNutModel( 0, 0, 2, 0, 0, 0, 2, 0,-2, 0, 0, 0, 0, -3, 0, 0, 0),
13048 new PlanetaryNutModel( 0, 1, 1, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -3, -2, 0),
13049 new PlanetaryNutModel( 1, 2, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 126, -63, -27, -55),
13050 new PlanetaryNutModel(-1, 2, 0, 2, 0, 10, -3, 0, 0, 0, 0, 0, 0, -5, 0, 1, 2),
13051
13052 /* 661-670 */
13053 new PlanetaryNutModel( 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, -3, 28, 15, 2),
13054 new PlanetaryNutModel( 1, 2, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 5, 0, 1, -2),
13055 new PlanetaryNutModel( 0, 2, 0, 2, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, 9, 4, 1),
13056 new PlanetaryNutModel( 0, 2, 0, 2, 0, 0, -4, 8,-3, 0, 0, 0, 0, 0, 9, 4, -1),
13057 new PlanetaryNutModel(-1, 2, 0, 2, 0, 0, -4, 8,-3, 0, 0, 0, 0, -126, -63, -27, 55),
13058 new PlanetaryNutModel( 2, 2,-2, 2, 0, 0, -2, 0, 3, 0, 0, 0, 0, 3, 0, 0, -1),
13059 new PlanetaryNutModel( 1, 2, 0, 1, 0, 0, -2, 0, 3, 0, 0, 0, 0, 21, -11, -6, -11),
13060 new PlanetaryNutModel( 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -4, 0, 0),
13061 new PlanetaryNutModel(-1, 2, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, -21, -11, -6, 11),
13062 new PlanetaryNutModel(-2, 2, 2, 2, 0, 0, 2, 0,-2, 0, 0, 0, 0, -3, 0, 0, 1),
13063
13064 /* 671-680 */
13065 new PlanetaryNutModel( 0, 2, 0, 2, 0, 2, -3, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0),
13066 new PlanetaryNutModel( 0, 2, 0, 2, 0, 1, -1, 0, 0, 0, 0, 0, 0, 8, 0, 0, -4),
13067 new PlanetaryNutModel( 0, 2, 0, 2, 0, 0, 1, 0,-1, 0, 0, 0, 0, -6, 0, 0, 3),
13068 new PlanetaryNutModel( 0, 2, 0, 2, 0, 2, -2, 0, 0, 0, 0, 0, 0, -3, 0, 0, 1),
13069 new PlanetaryNutModel(-1, 2, 2, 2, 0, 0, -1, 0, 1, 0, 0, 0, 0, 3, 0, 0, -1),
13070 new PlanetaryNutModel( 1, 2, 0, 2, 0, -1, 1, 0, 0, 0, 0, 0, 0, -3, 0, 0, 1),
13071 new PlanetaryNutModel(-1, 2, 2, 2, 0, 0, 2, 0,-3, 0, 0, 0, 0, -5, 0, 0, 2),
13072 new PlanetaryNutModel( 2, 2, 0, 2, 0, 0, 2, 0,-3, 0, 0, 0, 0, 24, -12, -5, -11),
13073 new PlanetaryNutModel( 1, 2, 0, 2, 0, 0, -4, 8,-3, 0, 0, 0, 0, 0, 3, 1, 0),
13074 new PlanetaryNutModel( 1, 2, 0, 2, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, 3, 1, 0),
13075
13076 /* 681-687 */
13077 new PlanetaryNutModel( 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0),
13078 new PlanetaryNutModel( 0, 2, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, -24, -12, -5, 10),
13079 new PlanetaryNutModel( 2, 2, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 4, 0, -1, -2),
13080 new PlanetaryNutModel(-1, 2, 2, 2, 0, 0, 2, 0,-2, 0, 0, 0, 0, 13, 0, 0, -6),
13081 new PlanetaryNutModel(-1, 2, 2, 2, 0, 3, -3, 0, 0, 0, 0, 0, 0, 7, 0, 0, -3),
13082 new PlanetaryNutModel( 1, 2, 0, 2, 0, 1, -1, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1),
13083 new PlanetaryNutModel( 0, 2, 2, 2, 0, 0, 2, 0,-2, 0, 0, 0, 0, 3, 0, 0, -1)
13084 };
13085
13086 /* Number of terms in the planetary nutation model */
13087 final int NPL = xpl.length;
13088
13089 /*--------------------------------------------------------------------*/
13090
13091 /* Interval between fundamental date J2000.0 and given date (JC). */
13092 t = ((date1 - DJ00) + date2) / DJC;
13093
13094 /* ------------------- */
13095 /* LUNI-SOLAR NUTATION */
13096 /* ------------------- */
13097
13098 /* Fundamental (Delaunay) arguments */
13099
13100 /* Mean anomaly of the Moon (IERS 2003). */
13101 el = jauFal03(t);
13102
13103 /* Mean anomaly of the Sun (MHB2000). */
13104 elp = fmod(1287104.79305 +
13105 t * (129596581.0481 +
13106 t * (-0.5532 +
13107 t * (0.000136 +
13108 t * (-0.00001149)))), TURNAS) * DAS2R;
13109
13110 /* Mean longitude of the Moon minus that of the ascending node */
13111 /* (IERS 2003. */
13112 f = jauFaf03(t);
13113
13114 /* Mean elongation of the Moon from the Sun (MHB2000). */
13115 d = fmod(1072260.70369 +
13116 t * (1602961601.2090 +
13117 t * (-6.3706 +
13118 t * (0.006593 +
13119 t * (-0.00003169)))), TURNAS) * DAS2R;
13120
13121 /* Mean longitude of the ascending node of the Moon (IERS 2003). */
13122 om = jauFaom03(t);
13123
13124 /* Initialize the nutation values. */
13125 dp = 0.0;
13126 de = 0.0;
13127
13128 /* Summation of luni-solar nutation series (in reverse order). */
13129 for (i = NLS-1; i >= 0; i--) {
13130
13131 /* Argument and functions. */
13132 arg = fmod((double)xls[i].nl * el +
13133 (double)xls[i].nlp * elp +
13134 (double)xls[i].nf * f +
13135 (double)xls[i].nd * d +
13136 (double)xls[i].nom * om, D2PI);
13137 sarg = sin(arg);
13138 carg = cos(arg);
13139
13140 /* Term. */
13141 dp += (xls[i].sp + xls[i].spt * t) * sarg + xls[i].cp * carg;
13142 de += (xls[i].ce + xls[i].cet * t) * carg + xls[i].se * sarg;
13143 }
13144
13145 /* Convert from 0.1 microarcsec units to radians. */
13146 dpsils = dp * U2R;
13147 depsls = de * U2R;
13148
13149 /* ------------------ */
13150 /* PLANETARY NUTATION */
13151 /* ------------------ */
13152
13153 /* n.b. The MHB2000 code computes the luni-solar and planetary nutation */
13154 /* in different functions, using slightly different Delaunay */
13155 /* arguments in the two cases. This behaviour is faithfully */
13156 /* reproduced here. Use of the IERS 2003 expressions for both */
13157 /* cases leads to negligible changes, well below */
13158 /* 0.1 microarcsecond. */
13159
13160 /* Mean anomaly of the Moon (MHB2000). */
13161 al = fmod(2.35555598 + 8328.6914269554 * t, D2PI);
13162
13163 /* Mean longitude of the Moon minus that of the ascending node */
13164 /*(MHB2000). */
13165 af = fmod(1.627905234 + 8433.466158131 * t, D2PI);
13166
13167 /* Mean elongation of the Moon from the Sun (MHB2000). */
13168 ad = fmod(5.198466741 + 7771.3771468121 * t, D2PI);
13169
13170 /* Mean longitude of the ascending node of the Moon (MHB2000). */
13171 aom = fmod(2.18243920 - 33.757045 * t, D2PI);
13172
13173 /* General accumulated precession in longitude (IERS 2003). */
13174 apa = jauFapa03(t);
13175
13176 /* Planetary longitudes, Mercury through Uranus (IERS 2003). */
13177 alme = jauFame03(t);
13178 alve = jauFave03(t);
13179 alea = jauFae03(t);
13180 alma = jauFama03(t);
13181 alju = jauFaju03(t);
13182 alsa = jauFasa03(t);
13183 alur = jauFaur03(t);
13184
13185 /* Neptune longitude (MHB2000). */
13186 alne = fmod(5.321159000 + 3.8127774000 * t, D2PI);
13187
13188 /* Initialize the nutation values. */
13189 dp = 0.0;
13190 de = 0.0;
13191
13192 /* Summation of planetary nutation series (in reverse order). */
13193 for (i = NPL-1; i >= 0; i--) {
13194
13195 /* Argument and functions. */
13196 arg = fmod((double)xpl[i].nl * al +
13197 (double)xpl[i].nf * af +
13198 (double)xpl[i].nd * ad +
13199 (double)xpl[i].nom * aom +
13200 (double)xpl[i].nme * alme +
13201 (double)xpl[i].nve * alve +
13202 (double)xpl[i].nea * alea +
13203 (double)xpl[i].nma * alma +
13204 (double)xpl[i].nju * alju +
13205 (double)xpl[i].nsa * alsa +
13206 (double)xpl[i].nur * alur +
13207 (double)xpl[i].nne * alne +
13208 (double)xpl[i].npa * apa, D2PI);
13209 sarg = sin(arg);
13210 carg = cos(arg);
13211
13212 /* Term. */
13213 dp += (double)xpl[i].sp * sarg + (double)xpl[i].cp * carg;
13214 de += (double)xpl[i].se * sarg + (double)xpl[i].ce * carg;
13215
13216 }
13217
13218 /* Convert from 0.1 microarcsec units to radians. */
13219 dpsipl = dp * U2R;
13220 depspl = de * U2R;
13221
13222 /* ------- */
13223 /* RESULTS */
13224 /* ------- */
13225
13226 /* Add luni-solar and planetary components. */
13227 return new NutationTerms( dpsils + dpsipl,
13228 depsls + depspl);
13229 }
13230
13231 private final static class LSNutationModel
13232 {
13233 final int nl,nlp,nf,nd,nom; /* coefficients of l,l',F,D,Om */
13234 final double ps,pst,pc; /* longitude sin, t*sin, cos coefficients */
13235 final double ec,ect,es; /* obliquity cos, t*cos, sin coefficients */
13236
13237 public LSNutationModel( int nl,int nlp,int nf,int nd,int nom,
13238 double ps, double pst, double pc,
13239 double ec, double ect, double es ) {
13240 this.nl = nl;this.nlp = nlp;this.nf = nf;this.nd = nd;this.nom = nom;
13241 this.ps = ps;this.pst = pst;this.pc = pc;
13242 this.ec = ec;this.ect = ect; this.es= es;
13243 }
13244
13245 }
13246
13247 /**
13248 * Nutation, IAU 2000B model.
13249 *
13250 *<p>This function is derived from the International Astronomical Union's
13251 * SOFA (Standards Of Fundamental Astronomy) software collection.
13252 *
13253 *<p>Status: canonical model.
13254 *
13255 *<!-- Given: -->
13256 * @param date1 double TT as a 2-part Julian Date (Note 1)
13257 * @param date2 double TT as a 2-part Julian Date (Note 1)
13258 *
13259 *<!-- Returned: -->
13260 * @return nutation, luni-solar + planetary (Note 2)
13261 *
13262 * <p>Notes:
13263 * <ol>
13264 *
13265 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
13266 * convenient way between the two arguments. For example,
13267 * JD(TT)=2450123.7 could be expressed in any of these ways,
13268 * among others:
13269 *<pre>
13270 * date1 date2
13271 *
13272 * 2450123.7 0.0 (JD method)
13273 * 2451545.0 -1421.3 (J2000 method)
13274 * 2400000.5 50123.2 (MJD method)
13275 * 2450123.5 0.2 (date & time method)
13276 *</pre>
13277 * The JD method is the most natural and convenient to use in
13278 * cases where the loss of several decimal digits of resolution
13279 * is acceptable. The J2000 method is best matched to the way
13280 * the argument is handled internally and will deliver the
13281 * optimum resolution. The MJD method and the date & time methods
13282 * are both good compromises between resolution and convenience.
13283 *
13284 * <li> The nutation components in longitude and obliquity are in radians
13285 * and with respect to the equinox and ecliptic of date. The
13286 * obliquity at J2000.0 is assumed to be the Lieske et al. (1977)
13287 * value of 84381.448 arcsec. (The errors that result from using
13288 * this function with the IAU 2006 value of 84381.406 arcsec can be
13289 * neglected.)
13290 *
13291 * The nutation model consists only of luni-solar terms, but
13292 * includes also a fixed offset which compensates for certain long-
13293 * period planetary terms (Note 7).
13294 *
13295 * <li> This function is an implementation of the IAU 2000B abridged
13296 * nutation model formally adopted by the IAU General Assembly in
13297 * 2000. The function computes the MHB_2000_SHORT luni-solar
13298 * nutation series (Luzum 2001), but without the associated
13299 * corrections for the precession rate adjustments and the offset
13300 * between the GCRS and J2000.0 mean poles.
13301 *
13302 * <li> The full IAU 2000A (MHB2000) nutation model contains nearly 1400
13303 * terms. The IAU 2000B model (McCarthy & Luzum 2003) contains only
13304 * 77 terms, plus additional simplifications, yet still delivers
13305 * results of 1 mas accuracy at present epochs. This combination of
13306 * accuracy and size makes the IAU 2000B abridged nutation model
13307 * suitable for most practical applications.
13308 *
13309 * The function delivers a pole accurate to 1 mas from 1900 to 2100
13310 * (usually better than 1 mas, very occasionally just outside
13311 * 1 mas). The full IAU 2000A model, which is implemented in the
13312 * function jauNut00a (q.v.), delivers considerably greater accuracy
13313 * at current dates; however, to realize this improved accuracy,
13314 * corrections for the essentially unpredictable free-core-nutation
13315 * (FCN) must also be included.
13316 *
13317 * <li> The present function provides classical nutation. The
13318 * MHB_2000_SHORT algorithm, from which it is adapted, deals also
13319 * with (i) the offsets between the GCRS and mean poles and (ii) the
13320 * adjustments in longitude and obliquity due to the changed
13321 * precession rates. These additional functions, namely frame bias
13322 * and precession adjustments, are supported by the JSOFA functions
13323 * jauBi00 and jauPr00.
13324 *
13325 * <li> The MHB_2000_SHORT algorithm also provides "total" nutations,
13326 * comprising the arithmetic sum of the frame bias, precession
13327 * adjustments, and nutation (luni-solar + planetary). These total
13328 * nutations can be used in combination with an existing IAU 1976
13329 * precession implementation, such as jauPmat76, to deliver GCRS-
13330 * to-true predictions of mas accuracy at current epochs. However,
13331 * for symmetry with the jauNut00a function (q.v. for the reasons),
13332 * the JSOFA functions do not generate the "total nutations"
13333 * directly. Should they be required, they could of course easily
13334 * be generated by calling jauBi00, jauPr00 and the present function
13335 * and adding the results.
13336 *
13337 * <li> The IAU 2000B model includes "planetary bias" terms that are
13338 * fixed in size but compensate for long-period nutations. The
13339 * amplitudes quoted in McCarthy & Luzum (2003), namely
13340 * Dpsi = -1.5835 mas and Depsilon = +1.6339 mas, are optimized for
13341 * the "total nutations" method described in Note 6. The Luzum
13342 * (2001) values used in this JSOFA implementation, namely -0.135 mas
13343 * and +0.388 mas, are optimized for the "rigorous" method, where
13344 * frame bias, precession and nutation are applied separately and in
13345 * that order. During the interval 1995-2050, the JSOFA
13346 * implementation delivers a maximum error of 1.001 mas (not
13347 * including FCN).
13348 *</ol>
13349 *<p>References:
13350 *
13351 * <p>Lieske, J.H., Lederle, T., Fricke, W., Morando, B., "Expressions
13352 * for the precession quantities based upon the IAU /1976/ system of
13353 * astronomical constants", Astron.Astrophys. 58, 1-2, 1-16. (1977)
13354 *
13355 * <p>Luzum, B., private communication, 2001 (Fortran code
13356 * MHB_2000_SHORT)
13357 *
13358 * <p>McCarthy, D.D. & Luzum, B.J., "An abridged model of the
13359 * precession-nutation of the celestial pole", Cel.Mech.Dyn.Astron.
13360 * 85, 37-49 (2003)
13361 *
13362 * <p>Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
13363 * Francou, G., Laskar, J., Astron.Astrophys. 282, 663-683 (1994)
13364 *
13365 *@version 2009 December 17
13366 *
13367 * @since Release 20101201
13368 *
13369 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
13370 */
13371 public static NutationTerms jauNut00b(double date1, double date2)
13372 {
13373 double t, el, elp, f, d, om, arg, dp, de, sarg, carg,
13374 dpsils, depsls, dpsipl, depspl;
13375 int i;
13376
13377 /* Units of 0.1 microarcsecond to radians */
13378 final double U2R = DAS2R / 1e7;
13379
13380 /* ---------------------------------------- */
13381 /* Fixed offsets in lieu of planetary terms */
13382 /* ---------------------------------------- */
13383
13384 final double DPPLAN = -0.135 * DMAS2R;
13385 final double DEPLAN = 0.388 * DMAS2R;
13386
13387 /* --------------------------------------------------- */
13388 /* Luni-solar nutation: argument and term coefficients */
13389 /* --------------------------------------------------- */
13390
13391 /* The units for the sine and cosine coefficients are */
13392 /* 0.1 microarcsec and the same per Julian century */
13393
13394 LSNutationModel x[] = {
13395
13396 /* 1-10 */
13397 new LSNutationModel( 0, 0, 0, 0,1,
13398 -172064161.0, -174666.0, 33386.0, 92052331.0, 9086.0, 15377.0),
13399 new LSNutationModel( 0, 0, 2,-2,2,
13400 -13170906.0, -1675.0, -13696.0, 5730336.0, -3015.0, -4587.0),
13401 new LSNutationModel( 0, 0, 2, 0,2,-2276413.0,-234.0, 2796.0, 978459.0,-485.0,1374.0),
13402 new LSNutationModel( 0, 0, 0, 0,2,2074554.0, 207.0, -698.0,-897492.0, 470.0,-291.0),
13403 new LSNutationModel( 0, 1, 0, 0,0,1475877.0,-3633.0,11817.0, 73871.0,-184.0,-1924.0),
13404 new LSNutationModel( 0, 1, 2,-2,2,-516821.0, 1226.0, -524.0, 224386.0,-677.0,-174.0),
13405 new LSNutationModel( 1, 0, 0, 0,0, 711159.0, 73.0, -872.0, -6750.0, 0.0, 358.0),
13406 new LSNutationModel( 0, 0, 2, 0,1,-387298.0, -367.0, 380.0, 200728.0, 18.0, 318.0),
13407 new LSNutationModel( 1, 0, 2, 0,2,-301461.0, -36.0, 816.0, 129025.0, -63.0, 367.0),
13408 new LSNutationModel( 0,-1, 2,-2,2, 215829.0, -494.0, 111.0, -95929.0, 299.0, 132.0),
13409
13410 /* 11-20 */
13411 new LSNutationModel( 0, 0, 2,-2,1, 128227.0, 137.0, 181.0, -68982.0, -9.0, 39.0),
13412 new LSNutationModel(-1, 0, 2, 0,2, 123457.0, 11.0, 19.0, -53311.0, 32.0, -4.0),
13413 new LSNutationModel(-1, 0, 0, 2,0, 156994.0, 10.0, -168.0, -1235.0, 0.0, 82.0),
13414 new LSNutationModel( 1, 0, 0, 0,1, 63110.0, 63.0, 27.0, -33228.0, 0.0, -9.0),
13415 new LSNutationModel(-1, 0, 0, 0,1, -57976.0, -63.0, -189.0, 31429.0, 0.0, -75.0),
13416 new LSNutationModel(-1, 0, 2, 2,2, -59641.0, -11.0, 149.0, 25543.0, -11.0, 66.0),
13417 new LSNutationModel( 1, 0, 2, 0,1, -51613.0, -42.0, 129.0, 26366.0, 0.0, 78.0),
13418 new LSNutationModel(-2, 0, 2, 0,1, 45893.0, 50.0, 31.0, -24236.0, -10.0, 20.0),
13419 new LSNutationModel( 0, 0, 0, 2,0, 63384.0, 11.0, -150.0, -1220.0, 0.0, 29.0),
13420 new LSNutationModel( 0, 0, 2, 2,2, -38571.0, -1.0, 158.0, 16452.0, -11.0, 68.0),
13421
13422 /* 21-30 */
13423 new LSNutationModel( 0,-2, 2,-2,2, 32481.0, 0.0, 0.0, -13870.0, 0.0, 0.0),
13424 new LSNutationModel(-2, 0, 0, 2,0, -47722.0, 0.0, -18.0, 477.0, 0.0, -25.0),
13425 new LSNutationModel( 2, 0, 2, 0,2, -31046.0, -1.0, 131.0, 13238.0, -11.0, 59.0),
13426 new LSNutationModel( 1, 0, 2,-2,2, 28593.0, 0.0, -1.0, -12338.0, 10.0, -3.0),
13427 new LSNutationModel(-1, 0, 2, 0,1, 20441.0, 21.0, 10.0, -10758.0, 0.0, -3.0),
13428 new LSNutationModel( 2, 0, 0, 0,0, 29243.0, 0.0, -74.0, -609.0, 0.0, 13.0),
13429 new LSNutationModel( 0, 0, 2, 0,0, 25887.0, 0.0, -66.0, -550.0, 0.0, 11.0),
13430 new LSNutationModel( 0, 1, 0, 0,1, -14053.0, -25.0, 79.0, 8551.0, -2.0, -45.0),
13431 new LSNutationModel(-1, 0, 0, 2,1, 15164.0, 10.0, 11.0, -8001.0, 0.0, -1.0),
13432 new LSNutationModel( 0, 2, 2,-2,2, -15794.0, 72.0, -16.0, 6850.0, -42.0, -5.0),
13433
13434 /* 31-40 */
13435 new LSNutationModel( 0, 0,-2, 2,0, 21783.0, 0.0, 13.0, -167.0, 0.0, 13.0),
13436 new LSNutationModel( 1, 0, 0,-2,1, -12873.0, -10.0, -37.0, 6953.0, 0.0, -14.0),
13437 new LSNutationModel( 0,-1, 0, 0,1, -12654.0, 11.0, 63.0, 6415.0, 0.0, 26.0),
13438 new LSNutationModel(-1, 0, 2, 2,1, -10204.0, 0.0, 25.0, 5222.0, 0.0, 15.0),
13439 new LSNutationModel( 0, 2, 0, 0,0, 16707.0, -85.0, -10.0, 168.0, -1.0, 10.0),
13440 new LSNutationModel( 1, 0, 2, 2,2, -7691.0, 0.0, 44.0, 3268.0, 0.0, 19.0),
13441 new LSNutationModel(-2, 0, 2, 0,0, -11024.0, 0.0, -14.0, 104.0, 0.0, 2.0),
13442 new LSNutationModel( 0, 1, 2, 0,2, 7566.0, -21.0, -11.0, -3250.0, 0.0, -5.0),
13443 new LSNutationModel( 0, 0, 2, 2,1, -6637.0, -11.0, 25.0, 3353.0, 0.0, 14.0),
13444 new LSNutationModel( 0,-1, 2, 0,2, -7141.0, 21.0, 8.0, 3070.0, 0.0, 4.0),
13445
13446 /* 41-50 */
13447 new LSNutationModel( 0, 0, 0, 2,1, -6302.0, -11.0, 2.0, 3272.0, 0.0, 4.0),
13448 new LSNutationModel( 1, 0, 2,-2,1, 5800.0, 10.0, 2.0, -3045.0, 0.0, -1.0),
13449 new LSNutationModel( 2, 0, 2,-2,2, 6443.0, 0.0, -7.0, -2768.0, 0.0, -4.0),
13450 new LSNutationModel(-2, 0, 0, 2,1, -5774.0, -11.0, -15.0, 3041.0, 0.0, -5.0),
13451 new LSNutationModel( 2, 0, 2, 0,1, -5350.0, 0.0, 21.0, 2695.0, 0.0, 12.0),
13452 new LSNutationModel( 0,-1, 2,-2,1, -4752.0, -11.0, -3.0, 2719.0, 0.0, -3.0),
13453 new LSNutationModel( 0, 0, 0,-2,1, -4940.0, -11.0, -21.0, 2720.0, 0.0, -9.0),
13454 new LSNutationModel(-1,-1, 0, 2,0, 7350.0, 0.0, -8.0, -51.0, 0.0, 4.0),
13455 new LSNutationModel( 2, 0, 0,-2,1, 4065.0, 0.0, 6.0, -2206.0, 0.0, 1.0),
13456 new LSNutationModel( 1, 0, 0, 2,0, 6579.0, 0.0, -24.0, -199.0, 0.0, 2.0),
13457
13458 /* 51-60 */
13459 new LSNutationModel( 0, 1, 2,-2,1, 3579.0, 0.0, 5.0, -1900.0, 0.0, 1.0),
13460 new LSNutationModel( 1,-1, 0, 0,0, 4725.0, 0.0, -6.0, -41.0, 0.0, 3.0),
13461 new LSNutationModel(-2, 0, 2, 0,2, -3075.0, 0.0, -2.0, 1313.0, 0.0, -1.0),
13462 new LSNutationModel( 3, 0, 2, 0,2, -2904.0, 0.0, 15.0, 1233.0, 0.0, 7.0),
13463 new LSNutationModel( 0,-1, 0, 2,0, 4348.0, 0.0, -10.0, -81.0, 0.0, 2.0),
13464 new LSNutationModel( 1,-1, 2, 0,2, -2878.0, 0.0, 8.0, 1232.0, 0.0, 4.0),
13465 new LSNutationModel( 0, 0, 0, 1,0, -4230.0, 0.0, 5.0, -20.0, 0.0, -2.0),
13466 new LSNutationModel(-1,-1, 2, 2,2, -2819.0, 0.0, 7.0, 1207.0, 0.0, 3.0),
13467 new LSNutationModel(-1, 0, 2, 0,0, -4056.0, 0.0, 5.0, 40.0, 0.0, -2.0),
13468 new LSNutationModel( 0,-1, 2, 2,2, -2647.0, 0.0, 11.0, 1129.0, 0.0, 5.0),
13469
13470 /* 61-70 */
13471 new LSNutationModel(-2, 0, 0, 0,1, -2294.0, 0.0, -10.0, 1266.0, 0.0, -4.0),
13472 new LSNutationModel( 1, 1, 2, 0,2, 2481.0, 0.0, -7.0, -1062.0, 0.0, -3.0),
13473 new LSNutationModel( 2, 0, 0, 0,1, 2179.0, 0.0, -2.0, -1129.0, 0.0, -2.0),
13474 new LSNutationModel(-1, 1, 0, 1,0, 3276.0, 0.0, 1.0, -9.0, 0.0, 0.0),
13475 new LSNutationModel( 1, 1, 0, 0,0, -3389.0, 0.0, 5.0, 35.0, 0.0, -2.0),
13476 new LSNutationModel( 1, 0, 2, 0,0, 3339.0, 0.0, -13.0, -107.0, 0.0, 1.0),
13477 new LSNutationModel(-1, 0, 2,-2,1, -1987.0, 0.0, -6.0, 1073.0, 0.0, -2.0),
13478 new LSNutationModel( 1, 0, 0, 0,2, -1981.0, 0.0, 0.0, 854.0, 0.0, 0.0),
13479 new LSNutationModel(-1, 0, 0, 1,0, 4026.0, 0.0, -353.0, -553.0, 0.0,-139.0),
13480 new LSNutationModel( 0, 0, 2, 1,2, 1660.0, 0.0, -5.0, -710.0, 0.0, -2.0),
13481
13482 /* 71-77 */
13483 new LSNutationModel(-1, 0, 2, 4,2, -1521.0, 0.0, 9.0, 647.0, 0.0, 4.0),
13484 new LSNutationModel(-1, 1, 0, 1,1, 1314.0, 0.0, 0.0, -700.0, 0.0, 0.0),
13485 new LSNutationModel( 0,-2, 2,-2,1, -1283.0, 0.0, 0.0, 672.0, 0.0, 0.0),
13486 new LSNutationModel( 1, 0, 2, 2,1, -1331.0, 0.0, 8.0, 663.0, 0.0, 4.0),
13487 new LSNutationModel(-2, 0, 2, 2,2, 1383.0, 0.0, -2.0, -594.0, 0.0, -2.0),
13488 new LSNutationModel(-1, 0, 0, 0,2, 1405.0, 0.0, 4.0, -610.0, 0.0, 2.0),
13489 new LSNutationModel( 1, 1, 2,-2,2, 1290.0, 0.0, 0.0, -556.0, 0.0, 0.0)
13490 };
13491
13492 /* Number of terms in the series */
13493 final int NLS = x.length;
13494
13495 /*--------------------------------------------------------------------*/
13496
13497 /* Interval between fundamental epoch J2000.0 and given date (JC). */
13498 t = ((date1 - DJ00) + date2) / DJC;
13499
13500 /* --------------------*/
13501 /* LUNI-SOLAR NUTATION */
13502 /* --------------------*/
13503
13504 /* Fundamental (Delaunay) arguments from Simon et al. (1994) */
13505
13506 /* Mean anomaly of the Moon. */
13507 el = fmod(485868.249036 + (1717915923.2178) * t, TURNAS) * DAS2R;
13508
13509 /* Mean anomaly of the Sun. */
13510 elp = fmod(1287104.79305 + (129596581.0481) * t, TURNAS) * DAS2R;
13511
13512 /* Mean argument of the latitude of the Moon. */
13513 f = fmod(335779.526232 + (1739527262.8478) * t, TURNAS) * DAS2R;
13514
13515 /* Mean elongation of the Moon from the Sun. */
13516 d = fmod(1072260.70369 + (1602961601.2090) * t, TURNAS) * DAS2R;
13517
13518 /* Mean longitude of the ascending node of the Moon. */
13519 om = fmod(450160.398036 + (-6962890.5431) * t, TURNAS) * DAS2R;
13520
13521 /* Initialize the nutation values. */
13522 dp = 0.0;
13523 de = 0.0;
13524
13525 /* Summation of luni-solar nutation series (smallest terms first). */
13526 for (i = NLS-1; i >= 0; i--) {
13527
13528 /* Argument and functions. */
13529 arg = fmod( (double)x[i].nl * el +
13530 (double)x[i].nlp * elp +
13531 (double)x[i].nf * f +
13532 (double)x[i].nd * d +
13533 (double)x[i].nom * om, D2PI );
13534 sarg = sin(arg);
13535 carg = cos(arg);
13536
13537 /* Term. */
13538 dp += (x[i].ps + x[i].pst * t) * sarg + x[i].pc * carg;
13539 de += (x[i].ec + x[i].ect * t) * carg + x[i].es * sarg;
13540 }
13541
13542 /* Convert from 0.1 microarcsec units to radians. */
13543 dpsils = dp * U2R;
13544 depsls = de * U2R;
13545
13546 /* ------------------------------*/
13547 /* IN LIEU OF PLANETARY NUTATION */
13548 /* ------------------------------*/
13549
13550 /* Fixed offset to correct for missing terms in truncated series. */
13551 dpsipl = DPPLAN;
13552 depspl = DEPLAN;
13553
13554 /* --------*/
13555 /* RESULTS */
13556 /* --------*/
13557
13558 /* Add luni-solar and planetary components. */
13559 return new NutationTerms( dpsils + dpsipl,
13560 depsls + depspl);
13561
13562 }
13563
13564
13565 /**
13566 * IAU 2000A nutation with adjustments to match the IAU 2006
13567 * precession.
13568 *
13569 *<!-- Given: -->
13570 * @param date1 double TT as a 2-part Julian Date (Note 1)
13571 * @param date2 double TT as a 2-part Julian Date (Note 1)
13572 *
13573 *<!-- Returned: -->
13574 * @return nutation, luni-solar + planetary (Note 2)
13575 *
13576 *<p>Status: canonical model.
13577 *
13578 * <p>Notes:
13579 * <ol>
13580 *
13581 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
13582 * convenient way between the two arguments. For example,
13583 * JD(TT)=2450123.7 could be expressed in any of these ways,
13584 * among others:
13585 *<pre>
13586 * date1 date2
13587 *
13588 * 2450123.7 0.0 (JD method)
13589 * 2451545.0 -1421.3 (J2000 method)
13590 * 2400000.5 50123.2 (MJD method)
13591 * 2450123.5 0.2 (date & time method)
13592 *</pre>
13593 * The JD method is the most natural and convenient to use in
13594 * cases where the loss of several decimal digits of resolution
13595 * is acceptable. The J2000 method is best matched to the way
13596 * the argument is handled internally and will deliver the
13597 * optimum resolution. The MJD method and the date & time methods
13598 * are both good compromises between resolution and convenience.
13599 *
13600 * <li> The nutation components in longitude and obliquity are in radians
13601 * and with respect to the mean equinox and ecliptic of date,
13602 * IAU 2006 precession model (Hilton et al. 2006, Capitaine et al.
13603 * 2005).
13604 *
13605 * <li> The function first computes the IAU 2000A nutation, then applies
13606 * adjustments for (i) the consequences of the change in obliquity
13607 * from the IAU 1980 ecliptic to the IAU 2006 ecliptic and (ii) the
13608 * secular variation in the Earth's dynamical flattening.
13609 *
13610 * <li> The present function provides classical nutation, complementing
13611 * the IAU 2000 frame bias and IAU 2006 precession. It delivers a
13612 * pole which is at current epochs accurate to a few tens of
13613 * microarcseconds, apart from the free core nutation.
13614 *</ol>
13615 *<p>Called:<ul>
13616 * <li>{@link #jauNut00a} nutation, IAU 2000A
13617 * </ul>
13618 *<p>References:
13619 *
13620 * <p>Chapront, J., Chapront-Touze, M. & Francou, G. 2002,
13621 * Astron.Astrophys. 387, 700
13622 *
13623 * <p>Lieske, J.H., Lederle, T., Fricke, W. & Morando, B. 1977,
13624 * Astron.Astrophys. 58, 1-16
13625 *
13626 * <p>Mathews, P.M., Herring, T.A., Buffet, B.A. 2002, J.Geophys.Res.
13627 * 107, B4. The MHB_2000 code itself was obtained on 9th September
13628 * 2002 from ftp//maia.usno.navy.mil/conv2000/chapter5/IAU2000A.
13629 *
13630 * <p>Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
13631 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
13632 *
13633 * <p>Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
13634 * Astron.Astrophys.Supp.Ser. 135, 111
13635 *
13636 * <p>Wallace, P.T., "Software for Implementing the IAU 2000
13637 * Resolutions", in IERS Workshop 5.1 (2002)
13638 *
13639 *@version 2008 May 24
13640 *
13641 * @since Release 20101201
13642 *
13643 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
13644 */
13645 public static NutationTerms jauNut06a(double date1, double date2)
13646 {
13647 double t, fj2;
13648
13649
13650 /* Interval between fundamental date J2000.0 and given date (JC). */
13651 t = ((date1 - DJ00) + date2) / DJC;
13652
13653 /* Factor correcting for secular variation of J2. */
13654 fj2 = -2.7774e-6 * t;
13655
13656 /* Obtain IAU 2000A nutation. */
13657 NutationTerms nt = jauNut00a(date1, date2);
13658
13659 /* Apply P03 adjustments (Wallace & Capitaine, 2006, Eqs.5). */
13660 return new NutationTerms( nt.dpsi + nt.dpsi * (0.4697e-6 + fj2),
13661 nt.deps + nt.deps * fj2);
13662
13663 }
13664
13665 private final static class NutationModel2 {
13666 final int nl,nlp,nf,nd,nom; /* coefficients of l,l',F,D,Om */
13667 final double sp,spt; /* longitude sine, 1 and t coefficients */
13668 final double ce,cet; /* obliquity cosine, 1 and t coefficients */
13669
13670 public NutationModel2(int nl,int nlp,int nf,int nd,int nom,
13671 double sp,double spt,
13672 double ce,double cet ) {
13673 this.nl = nl;this.nlp = nlp;this.nf = nf;this.nd = nd;this.nom = nom;
13674 this.sp = sp;this.spt = spt;
13675 this.ce = ce;this.cet = cet;
13676 }
13677 }
13678 /**
13679 * Nutation, IAU 1980 model.
13680 *
13681 *<p>This function is derived from the International Astronomical Union's
13682 * SOFA (Standards Of Fundamental Astronomy) software collection.
13683 *
13684 *<p>Status: canonical model.
13685 *
13686 *<!-- Given: -->
13687 * @param date1 double TT as a 2-part Julian Date (Note 1)
13688 * @param date2 double TT as a 2-part Julian Date (Note 1)
13689 *
13690 *<!-- Returned: -->
13691 * @return dpsi double <u>returned</u> nutation in longitude (radians)
13692 * deps double <u>returned</u> nutation in obliquity (radians)
13693 *
13694 * <p>Notes:
13695 * <ol>
13696 *
13697 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
13698 * convenient way between the two arguments. For example,
13699 * JD(TT)=2450123.7 could be expressed in any of these ways,
13700 * among others:
13701 *<pre>
13702 * date1 date2
13703 *
13704 * 2450123.7 0.0 (JD method)
13705 * 2451545.0 -1421.3 (J2000 method)
13706 * 2400000.5 50123.2 (MJD method)
13707 * 2450123.5 0.2 (date & time method)
13708 *</pre>
13709 * The JD method is the most natural and convenient to use in
13710 * cases where the loss of several decimal digits of resolution
13711 * is acceptable. The J2000 method is best matched to the way
13712 * the argument is handled internally and will deliver the
13713 * optimum resolution. The MJD method and the date & time methods
13714 * are both good compromises between resolution and convenience.
13715 *
13716 * <li> The nutation components are with respect to the ecliptic of
13717 * date.
13718 *</ol>
13719 *<p>Called:<ul>
13720 * <li>{@link #jauAnpm} normalize angle into range +/- pi
13721 * </ul>
13722 *<p>Reference:
13723 *
13724 * <p>Explanatory Supplement to the Astronomical Almanac,
13725 * P. Kenneth Seidelmann (ed), University Science Books (1992),
13726 * Section 3.222 (p111).
13727 *
13728 *@version 2008 September 30
13729 *
13730 * @since Release 20101201
13731 *
13732 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
13733 */
13734 public static NutationTerms jauNut80(double date1, double date2)
13735 {
13736 double t, el, elp, f, d, om, dp, de, arg, s, c;
13737 int j;
13738
13739 /* Units of 0.1 milliarcsecond to radians */
13740 final double U2R = DAS2R / 1e4;
13741
13742 /* ------------------------------------------------ */
13743 /* Table of multiples of arguments and coefficients */
13744 /* ------------------------------------------------ */
13745
13746 /* The units for the sine and cosine coefficients are 0.1 mas and */
13747 /* the same per Julian century */
13748
13749 NutationModel2 x[] = {
13750
13751 /* 1-10 */
13752 new NutationModel2( 0, 0, 0, 0, 1, -171996.0, -174.2, 92025.0, 8.9 ),
13753 new NutationModel2( 0, 0, 0, 0, 2, 2062.0, 0.2, -895.0, 0.5 ),
13754 new NutationModel2( -2, 0, 2, 0, 1, 46.0, 0.0, -24.0, 0.0 ),
13755 new NutationModel2( 2, 0, -2, 0, 0, 11.0, 0.0, 0.0, 0.0 ),
13756 new NutationModel2( -2, 0, 2, 0, 2, -3.0, 0.0, 1.0, 0.0 ),
13757 new NutationModel2( 1, -1, 0, -1, 0, -3.0, 0.0, 0.0, 0.0 ),
13758 new NutationModel2( 0, -2, 2, -2, 1, -2.0, 0.0, 1.0, 0.0 ),
13759 new NutationModel2( 2, 0, -2, 0, 1, 1.0, 0.0, 0.0, 0.0 ),
13760 new NutationModel2( 0, 0, 2, -2, 2, -13187.0, -1.6, 5736.0, -3.1 ),
13761 new NutationModel2( 0, 1, 0, 0, 0, 1426.0, -3.4, 54.0, -0.1 ),
13762
13763 /* 11-20 */
13764 new NutationModel2( 0, 1, 2, -2, 2, -517.0, 1.2, 224.0, -0.6 ),
13765 new NutationModel2( 0, -1, 2, -2, 2, 217.0, -0.5, -95.0, 0.3 ),
13766 new NutationModel2( 0, 0, 2, -2, 1, 129.0, 0.1, -70.0, 0.0 ),
13767 new NutationModel2( 2, 0, 0, -2, 0, 48.0, 0.0, 1.0, 0.0 ),
13768 new NutationModel2( 0, 0, 2, -2, 0, -22.0, 0.0, 0.0, 0.0 ),
13769 new NutationModel2( 0, 2, 0, 0, 0, 17.0, -0.1, 0.0, 0.0 ),
13770 new NutationModel2( 0, 1, 0, 0, 1, -15.0, 0.0, 9.0, 0.0 ),
13771 new NutationModel2( 0, 2, 2, -2, 2, -16.0, 0.1, 7.0, 0.0 ),
13772 new NutationModel2( 0, -1, 0, 0, 1, -12.0, 0.0, 6.0, 0.0 ),
13773 new NutationModel2( -2, 0, 0, 2, 1, -6.0, 0.0, 3.0, 0.0 ),
13774
13775 /* 21-30 */
13776 new NutationModel2( 0, -1, 2, -2, 1, -5.0, 0.0, 3.0, 0.0 ),
13777 new NutationModel2( 2, 0, 0, -2, 1, 4.0, 0.0, -2.0, 0.0 ),
13778 new NutationModel2( 0, 1, 2, -2, 1, 4.0, 0.0, -2.0, 0.0 ),
13779 new NutationModel2( 1, 0, 0, -1, 0, -4.0, 0.0, 0.0, 0.0 ),
13780 new NutationModel2( 2, 1, 0, -2, 0, 1.0, 0.0, 0.0, 0.0 ),
13781 new NutationModel2( 0, 0, -2, 2, 1, 1.0, 0.0, 0.0, 0.0 ),
13782 new NutationModel2( 0, 1, -2, 2, 0, -1.0, 0.0, 0.0, 0.0 ),
13783 new NutationModel2( 0, 1, 0, 0, 2, 1.0, 0.0, 0.0, 0.0 ),
13784 new NutationModel2( -1, 0, 0, 1, 1, 1.0, 0.0, 0.0, 0.0 ),
13785 new NutationModel2( 0, 1, 2, -2, 0, -1.0, 0.0, 0.0, 0.0 ),
13786
13787 /* 31-40 */
13788 new NutationModel2( 0, 0, 2, 0, 2, -2274.0, -0.2, 977.0, -0.5 ),
13789 new NutationModel2( 1, 0, 0, 0, 0, 712.0, 0.1, -7.0, 0.0 ),
13790 new NutationModel2( 0, 0, 2, 0, 1, -386.0, -0.4, 200.0, 0.0 ),
13791 new NutationModel2( 1, 0, 2, 0, 2, -301.0, 0.0, 129.0, -0.1 ),
13792 new NutationModel2( 1, 0, 0, -2, 0, -158.0, 0.0, -1.0, 0.0 ),
13793 new NutationModel2( -1, 0, 2, 0, 2, 123.0, 0.0, -53.0, 0.0 ),
13794 new NutationModel2( 0, 0, 0, 2, 0, 63.0, 0.0, -2.0, 0.0 ),
13795 new NutationModel2( 1, 0, 0, 0, 1, 63.0, 0.1, -33.0, 0.0 ),
13796 new NutationModel2( -1, 0, 0, 0, 1, -58.0, -0.1, 32.0, 0.0 ),
13797 new NutationModel2( -1, 0, 2, 2, 2, -59.0, 0.0, 26.0, 0.0 ),
13798
13799 /* 41-50 */
13800 new NutationModel2( 1, 0, 2, 0, 1, -51.0, 0.0, 27.0, 0.0 ),
13801 new NutationModel2( 0, 0, 2, 2, 2, -38.0, 0.0, 16.0, 0.0 ),
13802 new NutationModel2( 2, 0, 0, 0, 0, 29.0, 0.0, -1.0, 0.0 ),
13803 new NutationModel2( 1, 0, 2, -2, 2, 29.0, 0.0, -12.0, 0.0 ),
13804 new NutationModel2( 2, 0, 2, 0, 2, -31.0, 0.0, 13.0, 0.0 ),
13805 new NutationModel2( 0, 0, 2, 0, 0, 26.0, 0.0, -1.0, 0.0 ),
13806 new NutationModel2( -1, 0, 2, 0, 1, 21.0, 0.0, -10.0, 0.0 ),
13807 new NutationModel2( -1, 0, 0, 2, 1, 16.0, 0.0, -8.0, 0.0 ),
13808 new NutationModel2( 1, 0, 0, -2, 1, -13.0, 0.0, 7.0, 0.0 ),
13809 new NutationModel2( -1, 0, 2, 2, 1, -10.0, 0.0, 5.0, 0.0 ),
13810
13811 /* 51-60 */
13812 new NutationModel2( 1, 1, 0, -2, 0, -7.0, 0.0, 0.0, 0.0 ),
13813 new NutationModel2( 0, 1, 2, 0, 2, 7.0, 0.0, -3.0, 0.0 ),
13814 new NutationModel2( 0, -1, 2, 0, 2, -7.0, 0.0, 3.0, 0.0 ),
13815 new NutationModel2( 1, 0, 2, 2, 2, -8.0, 0.0, 3.0, 0.0 ),
13816 new NutationModel2( 1, 0, 0, 2, 0, 6.0, 0.0, 0.0, 0.0 ),
13817 new NutationModel2( 2, 0, 2, -2, 2, 6.0, 0.0, -3.0, 0.0 ),
13818 new NutationModel2( 0, 0, 0, 2, 1, -6.0, 0.0, 3.0, 0.0 ),
13819 new NutationModel2( 0, 0, 2, 2, 1, -7.0, 0.0, 3.0, 0.0 ),
13820 new NutationModel2( 1, 0, 2, -2, 1, 6.0, 0.0, -3.0, 0.0 ),
13821 new NutationModel2( 0, 0, 0, -2, 1, -5.0, 0.0, 3.0, 0.0 ),
13822
13823 /* 61-70 */
13824 new NutationModel2( 1, -1, 0, 0, 0, 5.0, 0.0, 0.0, 0.0 ),
13825 new NutationModel2( 2, 0, 2, 0, 1, -5.0, 0.0, 3.0, 0.0 ),
13826 new NutationModel2( 0, 1, 0, -2, 0, -4.0, 0.0, 0.0, 0.0 ),
13827 new NutationModel2( 1, 0, -2, 0, 0, 4.0, 0.0, 0.0, 0.0 ),
13828 new NutationModel2( 0, 0, 0, 1, 0, -4.0, 0.0, 0.0, 0.0 ),
13829 new NutationModel2( 1, 1, 0, 0, 0, -3.0, 0.0, 0.0, 0.0 ),
13830 new NutationModel2( 1, 0, 2, 0, 0, 3.0, 0.0, 0.0, 0.0 ),
13831 new NutationModel2( 1, -1, 2, 0, 2, -3.0, 0.0, 1.0, 0.0 ),
13832 new NutationModel2( -1, -1, 2, 2, 2, -3.0, 0.0, 1.0, 0.0 ),
13833 new NutationModel2( -2, 0, 0, 0, 1, -2.0, 0.0, 1.0, 0.0 ),
13834
13835 /* 71-80 */
13836 new NutationModel2( 3, 0, 2, 0, 2, -3.0, 0.0, 1.0, 0.0 ),
13837 new NutationModel2( 0, -1, 2, 2, 2, -3.0, 0.0, 1.0, 0.0 ),
13838 new NutationModel2( 1, 1, 2, 0, 2, 2.0, 0.0, -1.0, 0.0 ),
13839 new NutationModel2( -1, 0, 2, -2, 1, -2.0, 0.0, 1.0, 0.0 ),
13840 new NutationModel2( 2, 0, 0, 0, 1, 2.0, 0.0, -1.0, 0.0 ),
13841 new NutationModel2( 1, 0, 0, 0, 2, -2.0, 0.0, 1.0, 0.0 ),
13842 new NutationModel2( 3, 0, 0, 0, 0, 2.0, 0.0, 0.0, 0.0 ),
13843 new NutationModel2( 0, 0, 2, 1, 2, 2.0, 0.0, -1.0, 0.0 ),
13844 new NutationModel2( -1, 0, 0, 0, 2, 1.0, 0.0, -1.0, 0.0 ),
13845 new NutationModel2( 1, 0, 0, -4, 0, -1.0, 0.0, 0.0, 0.0 ),
13846
13847 /* 81-90 */
13848 new NutationModel2( -2, 0, 2, 2, 2, 1.0, 0.0, -1.0, 0.0 ),
13849 new NutationModel2( -1, 0, 2, 4, 2, -2.0, 0.0, 1.0, 0.0 ),
13850 new NutationModel2( 2, 0, 0, -4, 0, -1.0, 0.0, 0.0, 0.0 ),
13851 new NutationModel2( 1, 1, 2, -2, 2, 1.0, 0.0, -1.0, 0.0 ),
13852 new NutationModel2( 1, 0, 2, 2, 1, -1.0, 0.0, 1.0, 0.0 ),
13853 new NutationModel2( -2, 0, 2, 4, 2, -1.0, 0.0, 1.0, 0.0 ),
13854 new NutationModel2( -1, 0, 4, 0, 2, 1.0, 0.0, 0.0, 0.0 ),
13855 new NutationModel2( 1, -1, 0, -2, 0, 1.0, 0.0, 0.0, 0.0 ),
13856 new NutationModel2( 2, 0, 2, -2, 1, 1.0, 0.0, -1.0, 0.0 ),
13857 new NutationModel2( 2, 0, 2, 2, 2, -1.0, 0.0, 0.0, 0.0 ),
13858
13859 /* 91-100 */
13860 new NutationModel2( 1, 0, 0, 2, 1, -1.0, 0.0, 0.0, 0.0 ),
13861 new NutationModel2( 0, 0, 4, -2, 2, 1.0, 0.0, 0.0, 0.0 ),
13862 new NutationModel2( 3, 0, 2, -2, 2, 1.0, 0.0, 0.0, 0.0 ),
13863 new NutationModel2( 1, 0, 2, -2, 0, -1.0, 0.0, 0.0, 0.0 ),
13864 new NutationModel2( 0, 1, 2, 0, 1, 1.0, 0.0, 0.0, 0.0 ),
13865 new NutationModel2( -1, -1, 0, 2, 1, 1.0, 0.0, 0.0, 0.0 ),
13866 new NutationModel2( 0, 0, -2, 0, 1, -1.0, 0.0, 0.0, 0.0 ),
13867 new NutationModel2( 0, 0, 2, -1, 2, -1.0, 0.0, 0.0, 0.0 ),
13868 new NutationModel2( 0, 1, 0, 2, 0, -1.0, 0.0, 0.0, 0.0 ),
13869 new NutationModel2( 1, 0, -2, -2, 0, -1.0, 0.0, 0.0, 0.0 ),
13870
13871 /* 101-106 */
13872 new NutationModel2( 0, -1, 2, 0, 1, -1.0, 0.0, 0.0, 0.0 ),
13873 new NutationModel2( 1, 1, 0, -2, 1, -1.0, 0.0, 0.0, 0.0 ),
13874 new NutationModel2( 1, 0, -2, 2, 0, -1.0, 0.0, 0.0, 0.0 ),
13875 new NutationModel2( 2, 0, 0, 2, 0, 1.0, 0.0, 0.0, 0.0 ),
13876 new NutationModel2( 0, 0, 2, 4, 2, -1.0, 0.0, 0.0, 0.0 ),
13877 new NutationModel2( 0, 1, 0, 1, 0, 1.0, 0.0, 0.0, 0.0 )
13878 };
13879
13880 /* Number of terms in the series */
13881 final int NT = x.length;
13882
13883 /*--------------------------------------------------------------------*/
13884
13885 /* Interval between fundamental epoch J2000.0 and given date (JC). */
13886 t = ((date1 - DJ00) + date2) / DJC;
13887
13888 /* --------------------- */
13889 /* Fundamental arguments */
13890 /* --------------------- */
13891
13892 /* Mean longitude of Moon minus mean longitude of Moon's perigee. */
13893 el = jauAnpm(
13894 (485866.733 + (715922.633 + (31.310 + 0.064 * t) * t) * t)
13895 * DAS2R + fmod(1325.0 * t, 1.0) * D2PI);
13896
13897 /* Mean longitude of Sun minus mean longitude of Sun's perigee. */
13898 elp = jauAnpm(
13899 (1287099.804 + (1292581.224 + (-0.577 - 0.012 * t) * t) * t)
13900 * DAS2R + fmod(99.0 * t, 1.0) * D2PI);
13901
13902 /* Mean longitude of Moon minus mean longitude of Moon's node. */
13903 f = jauAnpm(
13904 (335778.877 + (295263.137 + (-13.257 + 0.011 * t) * t) * t)
13905 * DAS2R + fmod(1342.0 * t, 1.0) * D2PI);
13906
13907 /* Mean elongation of Moon from Sun. */
13908 d = jauAnpm(
13909 (1072261.307 + (1105601.328 + (-6.891 + 0.019 * t) * t) * t)
13910 * DAS2R + fmod(1236.0 * t, 1.0) * D2PI);
13911
13912 /* Longitude of the mean ascending node of the lunar orbit on the */
13913 /* ecliptic, measured from the mean equinox of date. */
13914 om = jauAnpm(
13915 (450160.280 + (-482890.539 + (7.455 + 0.008 * t) * t) * t)
13916 * DAS2R + fmod(-5.0 * t, 1.0) * D2PI);
13917
13918 /* --------------- */
13919 /* Nutation series */
13920 /* --------------- */
13921
13922 /* Initialize nutation components. */
13923 dp = 0.0;
13924 de = 0.0;
13925
13926 /* Sum the nutation terms, ending with the biggest. */
13927 for (j = NT-1; j >= 0; j--) {
13928
13929 /* Form argument for current term. */
13930 arg = (double)x[j].nl * el
13931 + (double)x[j].nlp * elp
13932 + (double)x[j].nf * f
13933 + (double)x[j].nd * d
13934 + (double)x[j].nom * om;
13935
13936 /* Accumulate current nutation term. */
13937 s = x[j].sp + x[j].spt * t;
13938 c = x[j].ce + x[j].cet * t;
13939 if (s != 0.0) dp += s * sin(arg);
13940 if (c != 0.0) de += c * cos(arg);
13941 }
13942
13943 /* Convert results from 0.1 mas units to radians. */
13944 return new NutationTerms( dp * U2R,
13945 de * U2R);
13946
13947 }
13948
13949
13950 /**
13951 * Form the matrix of nutation for a given date, IAU 1980 model.
13952 *
13953 *<p>This function is derived from the International Astronomical Union's
13954 * SOFA (Standards Of Fundamental Astronomy) software collection.
13955 *
13956 *<p>Status: support function.
13957 *
13958 *<!-- Given: -->
13959 * @param date1 double TDB date (Note 1)
13960 * @param date2 double TDB date (Note 1)
13961 *
13962 *<!-- Returned: -->
13963 * @return double[3][3] nutation matrix
13964 *
13965 * <p>Notes:
13966 * <ol>
13967 *
13968 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
13969 * convenient way between the two arguments. For example,
13970 * JD(TT)=2450123.7 could be expressed in any of these ways,
13971 * among others:
13972 *<pre>
13973 * date1 date2
13974 *
13975 * 2450123.7 0.0 (JD method)
13976 * 2451545.0 -1421.3 (J2000 method)
13977 * 2400000.5 50123.2 (MJD method)
13978 * 2450123.5 0.2 (date & time method)
13979 *</pre>
13980 * The JD method is the most natural and convenient to use in
13981 * cases where the loss of several decimal digits of resolution
13982 * is acceptable. The J2000 method is best matched to the way
13983 * the argument is handled internally and will deliver the
13984 * optimum resolution. The MJD method and the date & time methods
13985 * are both good compromises between resolution and convenience.
13986 *
13987 * <li> The matrix operates in the sense V(true) = rmatn * V(mean),
13988 * where the p-vector V(true) is with respect to the true
13989 * equatorial triad of date and the p-vector V(mean) is with
13990 * respect to the mean equatorial triad of date.
13991 *</ol>
13992 *<p>Called:<ul>
13993 * <li>{@link #jauNut80} nutation, IAU 1980
13994 * <li>{@link #jauObl80} mean obliquity, IAU 1980
13995 * <li>{@link #jauNumat} form nutation matrix
13996 * </ul>
13997 *@version 2008 May 12
13998 *
13999 * @since Release 20101201
14000 *
14001 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
14002 */
14003 public static double[][] jauNutm80(double date1, double date2)
14004 {
14005 double rmatn[][];
14006 /* Nutation components and mean obliquity. */
14007 NutationTerms nt = jauNut80(date1, date2);
14008 double epsa = jauObl80(date1, date2);
14009
14010 /* Build the rotation matrix. */
14011 rmatn = jauNumat(epsa, nt.dpsi, nt.deps);
14012
14013 return rmatn;
14014
14015 }
14016
14017
14018 /**
14019 * Mean obliquity of the ecliptic, IAU 2006 precession model.
14020 *
14021 *<p>This function is derived from the International Astronomical Union's
14022 * SOFA (Standards Of Fundamental Astronomy) software collection.
14023 *
14024 *<p>Status: canonical model.
14025 *
14026 *<!-- Given: -->
14027 * @param date1 double TT as a 2-part Julian Date (Note 1)
14028 * @param date2 double TT as a 2-part Julian Date (Note 1)
14029 *
14030 * <!-- Returned (function value): -->
14031 * @return double obliquity of the ecliptic (radians, Note 2)
14032 *
14033 * <p>Notes:
14034 * <ol>
14035 *
14036 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
14037 * convenient way between the two arguments. For example,
14038 * JD(TT)=2450123.7 could be expressed in any of these ways,
14039 * among others:
14040 *<pre>
14041 * date1 date2
14042 *
14043 * 2450123.7 0.0 (JD method)
14044 * 2451545.0 -1421.3 (J2000 method)
14045 * 2400000.5 50123.2 (MJD method)
14046 * 2450123.5 0.2 (date & time method)
14047 *</pre>
14048 * The JD method is the most natural and convenient to use in
14049 * cases where the loss of several decimal digits of resolution
14050 * is acceptable. The J2000 method is best matched to the way
14051 * the argument is handled internally and will deliver the
14052 * optimum resolution. The MJD method and the date & time methods
14053 * are both good compromises between resolution and convenience.
14054 *
14055 * <li> The result is the angle between the ecliptic and mean equator of
14056 * date date1+date2.
14057 *</ol>
14058 *<p>Reference:
14059 *
14060 * Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351
14061 *
14062 *@version 2009 March 16
14063 *
14064 * @since Release 20101201
14065 *
14066 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
14067 */
14068 public static double jauObl06(double date1, double date2)
14069 {
14070 double t, eps0;
14071
14072
14073 /* Interval between fundamental date J2000.0 and given date (JC). */
14074 t = ((date1 - DJ00) + date2) / DJC;
14075
14076 /* Mean obliquity. */
14077 eps0 = (84381.406 +
14078 (-46.836769 +
14079 ( -0.0001831 +
14080 ( 0.00200340 +
14081 ( -0.000000576 +
14082 ( -0.0000000434) * t) * t) * t) * t) * t) * DAS2R;
14083
14084 return eps0;
14085
14086 }
14087
14088
14089 /**
14090 * Mean obliquity of the ecliptic, IAU 1980 model.
14091 *
14092 *<p>This function is derived from the International Astronomical Union's
14093 * SOFA (Standards Of Fundamental Astronomy) software collection.
14094 *
14095 *<p>Status: canonical model.
14096 *
14097 *<!-- Given: -->
14098 * @param date1 double TT as a 2-part Julian Date (Note 1)
14099 * @param date2 double TT as a 2-part Julian Date (Note 1)
14100 *
14101 * <!-- Returned (function value): -->
14102 * @return double obliquity of the ecliptic (radians, Note 2)
14103 *
14104 * <p>Notes:
14105 * <ol>
14106 *
14107 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
14108 * convenient way between the two arguments. For example,
14109 * JD(TT)=2450123.7 could be expressed in any of these ways,
14110 * among others:
14111 *<pre>
14112 * date1 date2
14113 *
14114 * 2450123.7 0.0 (JD method)
14115 * 2451545.0 -1421.3 (J2000 method)
14116 * 2400000.5 50123.2 (MJD method)
14117 * 2450123.5 0.2 (date & time method)
14118 *</pre>
14119 * The JD method is the most natural and convenient to use in
14120 * cases where the loss of several decimal digits of resolution
14121 * is acceptable. The J2000 method is best matched to the way
14122 * the argument is handled internally and will deliver the
14123 * optimum resolution. The MJD method and the date & time methods
14124 * are both good compromises between resolution and convenience.
14125 *
14126 * <li> The result is the angle between the ecliptic and mean equator of
14127 * date date1+date2.
14128 *</ol>
14129 *<p>Reference:
14130 *
14131 * <p>Explanatory Supplement to the Astronomical Almanac,
14132 * P. Kenneth Seidelmann (ed), University Science Books (1992),
14133 * Expression 3.222-1 (p114).
14134 *
14135 *@version 2009 March 16
14136 *
14137 * @since Release 20101201
14138 *
14139 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
14140 */
14141 public static double jauObl80(double date1, double date2)
14142 {
14143 double t, eps0;
14144
14145
14146 /* Interval between fundamental epoch J2000.0 and given date (JC). */
14147 t = ((date1 - DJ00) + date2) / DJC;
14148
14149 /* Mean obliquity of date. */
14150 eps0 = DAS2R * (84381.448 +
14151 (-46.8150 +
14152 (-0.00059 +
14153 ( 0.001813) * t) * t) * t);
14154
14155 return eps0;
14156
14157 }
14158
14159
14160 /**
14161 * equinox based precession angles.
14162 * .
14163 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 21 Nov 2011
14164 * @version $Revision$ $date$
14165 */
14166 public static class PrecessionAngles {
14167 /** epsilon_0 obliquity at J2000.0. */
14168 public double eps0;
14169 /** psi_A luni-solar precession. */
14170 public double psia;
14171 /** omega_A inclination of equator wrt J2000.0 ecliptic. */
14172 public double oma;
14173 /** P_A ecliptic pole x, J2000.0 ecliptic triad. */
14174 public double bpa;
14175 /** Q_A ecliptic pole -y, J2000.0 ecliptic triad. */
14176 public double bqa;
14177 /** pi_A angle between moving and J2000.0 ecliptics. */
14178 public double pia;
14179 /** Pi_A longitude of ascending node of the ecliptic. */
14180 public double bpia;
14181 /** epsilon_A obliquity of the ecliptic. */
14182 public double epsa;
14183 /** chi_A planetary precession. */
14184 public double chia;
14185 /** z_A equatorial precession: -3rd 323 Euler angle. */
14186 public double za;
14187 /** zeta_A equatorial precession: -1st 323 Euler angle. */
14188 public double zetaa;
14189 /** theta_A equatorial precession: 2nd 323 Euler angle. */
14190 public double thetaa;
14191 /** p_A general precession. */
14192 public double pa;
14193 /** gamma_J2000 J2000.0 RA difference of ecliptic poles. */
14194 public double gam;
14195 /** phi_J2000 J2000.0 codeclination of ecliptic pole. */
14196 public double phi;
14197 /** psi_J2000 longitude difference of equator poles, J2000.0. */
14198 public double psi;
14199
14200 public PrecessionAngles ( double eps0, double psia, double oma, double bpa,
14201 double bqa, double pia, double bpia,
14202 double epsa, double chia, double za, double zetaa,
14203 double thetaa, double pa,
14204 double gam, double phi, double psi){
14205
14206 this.eps0 = eps0;
14207 this.psia = psia;
14208 this.oma = oma;
14209 this.bpa = bpa;
14210 this.bqa = bqa;
14211 this.pia = pia;
14212 this.bpia = bpia;
14213 this.epsa = epsa;
14214 this.chia = chia;
14215 this.za = za;
14216 this.zetaa = zetaa;
14217 this.thetaa = thetaa;
14218 this.pa = pa;
14219 this.gam = gam;
14220 this.phi = phi;
14221 this.psi = psi;
14222 }
14223 }
14224 /**
14225 * Precession angles, IAU 2006, equinox based.
14226 *
14227 *<p>This function is derived from the International Astronomical Union's
14228 * SOFA (Standards Of Fundamental Astronomy) software collection.
14229 *
14230 *<p>Status: canonical models.
14231 *
14232 *<!-- Given: -->
14233 * @param date1 double TT as a 2-part Julian Date (Note 1)
14234 * @param date2 double TT as a 2-part Julian Date (Note 1)
14235 *
14236 * @return (see Note 2):
14237 * eps0 double epsilon_0
14238 * psia double psi_A
14239 * oma double omega_A
14240 * bpa double P_A
14241 * bqa double Q_A
14242 * pia double pi_A
14243 * bpia double Pi_A
14244 * epsa double obliquity epsilon_A
14245 * chia double chi_A
14246 * za double z_A
14247 * zetaa double zeta_A
14248 * thetaa double theta_A
14249 * pa double p_A
14250 * gam double F-W angle gamma_J2000
14251 * phi double F-W angle phi_J2000
14252 * psi double F-W angle psi_J2000
14253 *
14254 * <p>Notes:
14255 * <ol>
14256 *
14257 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
14258 * convenient way between the two arguments. For example,
14259 * JD(TT)=2450123.7 could be expressed in any of these ways,
14260 * among others:
14261 *<pre>
14262 * date1 date2
14263 *
14264 * 2450123.7 0.0 (JD method)
14265 * 2451545.0 -1421.3 (J2000 method)
14266 * 2400000.5 50123.2 (MJD method)
14267 * 2450123.5 0.2 (date & time method)
14268 *</pre>
14269 * The JD method is the most natural and convenient to use in
14270 * cases where the loss of several decimal digits of resolution
14271 * is acceptable. The J2000 method is best matched to the way
14272 * the argument is handled internally and will deliver the
14273 * optimum resolution. The MJD method and the date & time methods
14274 * are both good compromises between resolution and convenience.
14275 *
14276 * <li> This function returns the set of equinox based angles for the
14277 * Capitaine et al. "P03" precession theory, adopted by the IAU in
14278 * 2006. The angles are set out in Table 1 of Hilton et al. (2006):
14279 *
14280 * eps0 epsilon_0 obliquity at J2000.0
14281 * psia psi_A luni-solar precession
14282 * oma omega_A inclination of equator wrt J2000.0 ecliptic
14283 * bpa P_A ecliptic pole x, J2000.0 ecliptic triad
14284 * bqa Q_A ecliptic pole -y, J2000.0 ecliptic triad
14285 * pia pi_A angle between moving and J2000.0 ecliptics
14286 * bpia Pi_A longitude of ascending node of the ecliptic
14287 * epsa epsilon_A obliquity of the ecliptic
14288 * chia chi_A planetary precession
14289 * za z_A equatorial precession: -3rd 323 Euler angle
14290 * zetaa zeta_A equatorial precession: -1st 323 Euler angle
14291 * thetaa theta_A equatorial precession: 2nd 323 Euler angle
14292 * pa p_A general precession (see note below)
14293 * gam gamma_J2000 J2000.0 RA difference of ecliptic poles
14294 * phi phi_J2000 J2000.0 codeclination of ecliptic pole
14295 * psi psi_J2000 longitude difference of equator poles, J2000.0
14296 *
14297 * The returned values are all radians.
14298 *
14299 * <li>Note that the t^5 coefficient in the series for p_A from
14300 * Capitaine et al. (2003) is incorrectly signed in Hilton et al. (2006).
14301 *
14302 * <li> Hilton et al. (2006) Table 1 also contains angles that depend on
14303 * models distinct from the P03 precession theory itself, namely the
14304 * IAU 2000A frame bias and nutation. The quoted polynomials are
14305 * used in other JSOFA functions:
14306 *
14307 * . jauXy06 contains the polynomial parts of the X and Y series.
14308 *
14309 * . jauS06 contains the polynomial part of the s+XY/2 series.
14310 *
14311 * . jauPfw06 implements the series for the Fukushima-Williams
14312 * angles that are with respect to the GCRS pole (i.e. the variants
14313 * that include frame bias).
14314 *
14315 * <li> The IAU resolution stipulated that the choice of parameterization
14316 * was left to the user, and so an IAU compliant precession
14317 * implementation can be constructed using various combinations of
14318 * the angles returned by the present function.
14319 *
14320 * <li> The parameterization used by JSOFA is the Fukushima-Williams angles
14321 * referred directly to the GCRS pole. These are the final four
14322 * arguments returned by the present function, but are more
14323 * efficiently calculated by calling the function jauPfw06. JSOFA
14324 * also supports the direct computation of the CIP GCRS X,Y by
14325 * series, available by calling jauXy06.
14326 *
14327 * <li> The agreement between the different parameterizations is at the
14328 * 1 microarcsecond level in the present era.
14329 *
14330 * <li> When constructing a precession formulation that refers to the GCRS
14331 * pole rather than the dynamical pole, it may (depending on the
14332 * choice of angles) be necessary to introduce the frame bias
14333 * explicitly.
14334 *
14335 * <li> It is permissible to re-use the same variable in the returned
14336 * arguments. The quantities are stored in the stated order.
14337 *</ol>
14338 *<p>References:<ol>
14339 * <li> Capitaine, N., Wallace, P.T. & Chapront, J., 2003, Astron.Astrophys., 412, 567
14340 * <li> Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351
14341 *</ol>
14342 *<p>Called:<ul>
14343 * <li>{@link #jauObl06} mean obliquity, IAU 2006
14344 * </ul>
14345 *@version 2020 Nov 13
14346 *
14347 * @since Release 20101201
14348 *
14349 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
14350 */
14351 public static PrecessionAngles jauP06e(double date1, double date2)
14352 {
14353 double t;
14354 double eps0, psia, oma, bpa,
14355 bqa, pia, bpia,
14356 epsa, chia, za, zetaa,
14357 thetaa, pa,
14358 gam, phi, psi;
14359
14360 /* Interval between fundamental date J2000.0 and given date (JC). */
14361 t = ((date1 - DJ00) + date2) / DJC;
14362
14363 /* Obliquity at J2000.0. */
14364
14365 eps0 = 84381.406 * DAS2R;
14366
14367 /* Luni-solar precession. */
14368
14369 psia = ( 5038.481507 +
14370 ( -1.0790069 +
14371 ( -0.00114045 +
14372 ( 0.000132851 +
14373 ( -0.0000000951 )
14374 * t) * t) * t) * t) * t * DAS2R;
14375
14376 /* Inclination of mean equator with respect to the J2000.0 ecliptic. */
14377
14378 oma = eps0 + ( -0.025754 +
14379 ( 0.0512623 +
14380 ( -0.00772503 +
14381 ( -0.000000467 +
14382 ( 0.0000003337 )
14383 * t) * t) * t) * t) * t * DAS2R;
14384
14385 /* Ecliptic pole x, J2000.0 ecliptic triad. */
14386
14387 bpa = ( 4.199094 +
14388 ( 0.1939873 +
14389 ( -0.00022466 +
14390 ( -0.000000912 +
14391 ( 0.0000000120 )
14392 * t) * t) * t) * t) * t * DAS2R;
14393
14394 /* Ecliptic pole -y, J2000.0 ecliptic triad. */
14395
14396 bqa = ( -46.811015 +
14397 ( 0.0510283 +
14398 ( 0.00052413 +
14399 ( -0.000000646 +
14400 ( -0.0000000172 )
14401 * t) * t) * t) * t) * t * DAS2R;
14402
14403 /* Angle between moving and J2000.0 ecliptics. */
14404
14405 pia = ( 46.998973 +
14406 ( -0.0334926 +
14407 ( -0.00012559 +
14408 ( 0.000000113 +
14409 ( -0.0000000022 )
14410 * t) * t) * t) * t) * t * DAS2R;
14411
14412 /* Longitude of ascending node of the moving ecliptic. */
14413
14414 bpia = ( 629546.7936 +
14415 ( -867.95758 +
14416 ( 0.157992 +
14417 ( -0.0005371 +
14418 ( -0.00004797 +
14419 ( 0.000000072 )
14420 * t) * t) * t) * t) * t) * DAS2R;
14421
14422 /* Mean obliquity of the ecliptic. */
14423
14424 epsa = jauObl06(date1, date2);
14425
14426 /* Planetary precession. */
14427
14428 chia = ( 10.556403 +
14429 ( -2.3814292 +
14430 ( -0.00121197 +
14431 ( 0.000170663 +
14432 ( -0.0000000560 )
14433 * t) * t) * t) * t) * t * DAS2R;
14434
14435 /* Equatorial precession: minus the third of the 323 Euler angles. */
14436
14437 za = ( -2.650545 +
14438 ( 2306.077181 +
14439 ( 1.0927348 +
14440 ( 0.01826837 +
14441 ( -0.000028596 +
14442 ( -0.0000002904 )
14443 * t) * t) * t) * t) * t) * DAS2R;
14444
14445 /* Equatorial precession: minus the first of the 323 Euler angles. */
14446
14447 zetaa = ( 2.650545 +
14448 ( 2306.083227 +
14449 ( 0.2988499 +
14450 ( 0.01801828 +
14451 ( -0.000005971 +
14452 ( -0.0000003173 )
14453 * t) * t) * t) * t) * t) * DAS2R;
14454
14455 /* Equatorial precession: second of the 323 Euler angles. */
14456
14457 thetaa = ( 2004.191903 +
14458 ( -0.4294934 +
14459 ( -0.04182264 +
14460 ( -0.000007089 +
14461 ( -0.0000001274 )
14462 * t) * t) * t) * t) * t * DAS2R;
14463
14464 /* General precession. */
14465
14466 pa = ( 5028.796195 +
14467 ( 1.1054348 +
14468 ( 0.00007964 +
14469 ( -0.000023857 +
14470 ( -0.0000000383 )
14471 * t) * t) * t) * t) * t * DAS2R;
14472
14473 /* Fukushima-Williams angles for precession. */
14474
14475 gam = ( 10.556403 +
14476 ( 0.4932044 +
14477 ( -0.00031238 +
14478 ( -0.000002788 +
14479 ( 0.0000000260 )
14480 * t) * t) * t) * t) * t * DAS2R;
14481
14482 phi = eps0 + ( -46.811015 +
14483 ( 0.0511269 +
14484 ( 0.00053289 +
14485 ( -0.000000440 +
14486 ( -0.0000000176 )
14487 * t) * t) * t) * t) * t * DAS2R;
14488
14489 psi = ( 5038.481507 +
14490 ( 1.5584176 +
14491 ( -0.00018522 +
14492 ( -0.000026452 +
14493 ( -0.0000000148 )
14494 * t) * t) * t) * t) * t * DAS2R;
14495
14496 return new PrecessionAngles(eps0, psia, oma, bpa, bqa, pia, bpia, epsa, chia, za, zetaa, thetaa, pa, gam, phi, psi);
14497
14498 }
14499
14500
14501 /**
14502 * Extend a p-vector to a pv-vector by appending a zero velocity.
14503 *
14504 *<p>This function is derived from the International Astronomical Union's
14505 * SOFA (Standards Of Fundamental Astronomy) software collection.
14506 *
14507 *<p>Status: vector/matrix support function.
14508 *
14509 *<!-- Given: -->
14510 * @param p double[3] p-vector
14511 *
14512 *<!-- Returned: -->
14513 * @return pv double[2][3] <u>returned</u> pv-vector
14514 *
14515 *<p>Called:<ul>
14516 * <li>{@link #jauCp} copy p-vector
14517 * <li>{@link #jauZp} zero p-vector
14518 * </ul>
14519 *@version 2008 May 11
14520 *
14521 * @since Release 20101201
14522 *
14523 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
14524 */
14525 public static double[][] jauP2pv(double p[] )
14526 {
14527 double pv[][] = new double[3][3];
14528 jauCp(p, pv[0]);
14529 jauZp(pv[1]);
14530
14531 return pv;
14532
14533 }
14534
14535 /**
14536 * A position expressed in spherical polar coordinates.
14537 * .
14538 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 21 Nov 2011
14539 * @version $Revision$ $date$
14540 */
14541 public static class SphericalPosition {
14542 /** longitude angle (radians) */
14543 public double theta;
14544 /** latitude angle (radians) */
14545 public double phi;
14546 /** radial distance */
14547 public double r;
14548 public SphericalPosition(double theta, double phi, double r) {
14549 this.theta = theta;
14550 this.phi = phi;
14551 this.r = r;
14552 }
14553 }
14554
14555 /**
14556 * P-vector to spherical polar coordinates.
14557 *
14558 *<p>This function is derived from the International Astronomical Union's
14559 * SOFA (Standards Of Fundamental Astronomy) software collection.
14560 *
14561 *<p>Status: vector/matrix support function.
14562 *
14563 *<!-- Given: -->
14564 * @param p double[3] p-vector
14565 *
14566 *<!-- Returned: -->
14567 * @return theta double <u>returned</u> longitude angle (radians)
14568 * phi double <u>returned</u> latitude angle (radians)
14569 * r double <u>returned</u> radial distance
14570 *
14571 * <p>Notes:
14572 * <ol>
14573 *
14574 * <li> If P is null, zero theta, phi and r are returned.
14575 *
14576 * <li> At either pole, zero theta is returned.
14577 *</ol>
14578 *<p>Called:<ul>
14579 * <li>{@link #jauC2s} p-vector to spherical
14580 * <li>{@link #jauPm} modulus of p-vector
14581 * </ul>
14582 *@version 2008 May 22
14583 *
14584 * @since Release 20101201
14585 *
14586 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
14587 */
14588 public static SphericalPosition jauP2s(double p[])
14589 {
14590 SphericalCoordinate sc = jauC2s(p);
14591 double r = jauPm(p);
14592
14593 return new SphericalPosition(sc.alpha, sc.delta, r);
14594
14595 }
14596
14597
14598 /**
14599 * Position-angle from two p-vectors.
14600 *
14601 *<p>This function is derived from the International Astronomical Union's
14602 * SOFA (Standards Of Fundamental Astronomy) software collection.
14603 *
14604 *<p>Status: vector/matrix support function.
14605 *
14606 *<!-- Given: -->
14607 * @param a double[3] direction of reference point
14608 * @param b double[3] direction of point whose PA is required
14609 *
14610 * <!-- Returned (function value): -->
14611 * @return double position angle of b with respect to a (radians)
14612 *
14613 * <p>Notes:
14614 * <ol>
14615 *
14616 * <li> The result is the position angle, in radians, of direction b with
14617 * respect to direction a. It is in the range -pi to +pi. The
14618 * sense is such that if b is a small distance "north" of a the
14619 * position angle is approximately zero, and if b is a small
14620 * distance "east" of a the position angle is approximately +pi/2.
14621 *
14622 * <li> The vectors a and b need not be of unit length.
14623 *
14624 * <li> Zero is returned if the two directions are the same or if either
14625 * vector is null.
14626 *
14627 * <li> If vector a is at a pole, the result is ill-defined.
14628 *</ol>
14629 *<p>Called:<ul>
14630 * <li>{@link #jauPn} decompose p-vector into modulus and direction
14631 * <li>{@link #jauPm} modulus of p-vector
14632 * <li>{@link #jauPxp} vector product of two p-vectors
14633 * <li>{@link #jauPmp} p-vector minus p-vector
14634 * <li>{@link #jauPdp} scalar product of two p-vectors
14635 * </ul>
14636 *@version 2008 May 25
14637 *
14638 * @since Release 20101201
14639 *
14640 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
14641 */
14642 public static double jauPap(double a[] , double b[] )
14643 {
14644 double am, au[] = new double[3], bm, st, ct, xa, ya, za, eta[] = new double[3], xi[] = new double[3], a2b[] = new double[3], pa;
14645
14646
14647 /* Modulus and direction of the a vector. */
14648 NormalizedVector nv = jauPn(a );
14649 am = nv.r; au = nv.u;
14650 /* Modulus of the b vector. */
14651 bm = jauPm(b);
14652
14653 /* Deal with the case of a null vector. */
14654 if ((am == 0.0) || (bm == 0.0)) {
14655 st = 0.0;
14656 ct = 1.0;
14657 } else {
14658
14659 /* The "north" axis tangential from a (arbitrary length). */
14660 xa = a[0];
14661 ya = a[1];
14662 za = a[2];
14663 eta[0] = -xa * za;
14664 eta[1] = -ya * za;
14665 eta[2] = xa*xa + ya*ya;
14666
14667 /* The "east" axis tangential from a (same length). */
14668 xi = jauPxp(eta,au);
14669
14670 /* The vector from a to b. */
14671 a2b = jauPmp(b, a);
14672
14673 /* Resolve into components along the north and east axes. */
14674 st = jauPdp(a2b, xi);
14675 ct = jauPdp(a2b, eta);
14676
14677 /* Deal with degenerate cases. */
14678 if ((st == 0.0) && (ct == 0.0)) ct = 1.0;
14679 }
14680
14681 /* Position angle. */
14682 pa = atan2(st, ct);
14683
14684 return pa;
14685
14686 }
14687
14688
14689 /**
14690 * Position-angle from spherical coordinates.
14691 *
14692 *<p>This function is derived from the International Astronomical Union's
14693 * SOFA (Standards Of Fundamental Astronomy) software collection.
14694 *
14695 *<p>Status: vector/matrix support function.
14696 *
14697 *<!-- Given: -->
14698 * @param al double longitude of point A (e.g. RA) in radians
14699 * @param ap double latitude of point A (e.g. Dec) in radians
14700 * @param bl double longitude of point B
14701 * @param bp double latitude of point B
14702 *
14703 * <!-- Returned (function value): -->
14704 * @return double position angle of B with respect to A
14705 *
14706 * <p>Notes:
14707 * <ol>
14708 *
14709 * <li> The result is the bearing (position angle), in radians, of point
14710 * B with respect to point A. It is in the range -pi to +pi. The
14711 * sense is such that if B is a small distance "east" of point A,
14712 * the bearing is approximately +pi/2.
14713 *
14714 * <li> Zero is returned if the two points are coincident.
14715 *</ol>
14716 *@version 2008 May 22
14717 *
14718 * @since Release 20101201
14719 *
14720 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
14721 */
14722 public static double jauPas(double al, double ap, double bl, double bp)
14723 {
14724 double dl, x, y, pa;
14725
14726
14727 dl = bl - al;
14728 y = sin(dl) * cos(bp);
14729 x = sin(bp) * cos(ap) - cos(bp) * sin(ap) * cos(dl);
14730 pa = ((x != 0.0) || (y != 0.0)) ? atan2(y, x) : 0.0;
14731
14732 return pa;
14733
14734 }
14735
14736
14737 /**
14738 * This function forms three Euler angles which implement general
14739 * precession from epoch J2000.0, using the IAU 2006 model. Frame
14740 * bias (the offset between ICRS and mean J2000.0) is included.
14741 *
14742 *<p>This function is derived from the International Astronomical Union's
14743 * SOFA (Standards Of Fundamental Astronomy) software collection.
14744 *
14745 *<p>Status: support function.
14746 *
14747 *<!-- Given: -->
14748 * @param date1 double TT as a 2-part Julian Date (Note 1)
14749 * @param date2 double TT as a 2-part Julian Date (Note 1)
14750 *
14751 *<!-- Returned: -->
14752 * @return bzeta 1st rotation: radians cw around z,
14753 * 3rd rotation: radians cw around z,
14754 * 2nd rotation: radians ccw around y.
14755 *
14756 * <p>Notes:
14757 * <ol>
14758 *
14759 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
14760 * convenient way between the two arguments. For example,
14761 * JD(TT)=2450123.7 could be expressed in any of these ways,
14762 * among others:
14763 *<pre>
14764 * date1 date2
14765 *
14766 * 2450123.7 0.0 (JD method)
14767 * 2451545.0 -1421.3 (J2000 method)
14768 * 2400000.5 50123.2 (MJD method)
14769 * 2450123.5 0.2 (date & time method)
14770 *</pre>
14771 * The JD method is the most natural and convenient to use in
14772 * cases where the loss of several decimal digits of resolution
14773 * is acceptable. The J2000 method is best matched to the way
14774 * the argument is handled internally and will deliver the
14775 * optimum resolution. The MJD method and the date & time methods
14776 * are both good compromises between resolution and convenience.
14777 *
14778 * <li> The traditional accumulated precession angles zeta_A, z_A,
14779 * theta_A cannot be obtained in the usual way, namely through
14780 * polynomial expressions, because of the frame bias. The latter
14781 * means that two of the angles undergo rapid changes near this
14782 * date. They are instead the results of decomposing the
14783 * precession-bias matrix obtained by using the Fukushima-Williams
14784 * method, which does not suffer from the problem. The
14785 * decomposition returns values which can be used in the
14786 * conventional formulation and which include frame bias.
14787 *
14788 * <li> The three angles are returned in the conventional order, which
14789 * is not the same as the order of the corresponding Euler
14790 * rotations. The precession-bias matrix is
14791 * R_3(-z) x R_2(+theta) x R_3(-zeta).
14792 *
14793 * <li> Should zeta_A, z_A, theta_A angles be required that do not
14794 * contain frame bias, they are available by calling the JSOFA
14795 * function jauP06e.
14796 *</ol>
14797 *<p>Called:<ul>
14798 * <li>{@link #jauPmat06} PB matrix, IAU 2006
14799 * <li>{@link #jauRz} rotate around Z-axis
14800 * </ul>
14801 *@version 2008 May 26
14802 *
14803 * @since Release 20101201
14804 *
14805 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
14806 */
14807 public static EulerAngles jauPb06(double date1, double date2)
14808 {
14809 double r[][] = new double[3][3], y, x;
14810
14811
14812 /* Precession matrix via Fukushima-Williams angles. */
14813 r = jauPmat06(date1, date2);
14814
14815 /* Solve for z, choosing the +/- pi alternative. */
14816 y = r[1][2];
14817 x = -r[0][2];
14818 if ( x < 0.0 ) {
14819 y = -y;
14820 x = -x;
14821 }
14822 double bz = ( x != 0.0 || y != 0.0 ) ? - atan2(y,x) : 0.0;
14823
14824 /* Derotate it out of the matrix. */
14825 jauRz ( bz, r );
14826
14827 /* Solve for the remaining two angles. */
14828 y = r[0][2];
14829 x = r[2][2];
14830 double btheta = ( x != 0.0 || y != 0.0 ) ? - atan2(y,x) : 0.0;
14831
14832 y = -r[1][0];
14833 x = r[1][1];
14834 double bzeta = ( x != 0.0 || y != 0.0 ) ? - atan2(y,x) : 0.0;
14835
14836 return new EulerAngles(bzeta, bz, btheta);
14837
14838 }
14839
14840
14841 /**
14842 * p-vector inner (=scalar=dot) product.
14843 *
14844 *<p>This function is derived from the International Astronomical Union's
14845 * SOFA (Standards Of Fundamental Astronomy) software collection.
14846 *
14847 *<p>Status: vector/matrix support function.
14848 *
14849 *<!-- Given: -->
14850 * @param a double[3] first p-vector
14851 * @param b double[3] second p-vector
14852 *
14853 * <!-- Returned (function value): -->
14854 * @return double a . b
14855 *
14856 *@version 2008 May 22
14857 *
14858 * @since Release 20101201
14859 *
14860 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
14861 */
14862 public static double jauPdp(double a[] , double b[] )
14863 {
14864 double w;
14865
14866
14867 w = a[0] * b[0]
14868 + a[1] * b[1]
14869 + a[2] * b[2];
14870
14871 return w;
14872
14873 }
14874
14875
14876 /**
14877 * Precession angles, IAU 2006 (Fukushima-Williams 4-angle formulation).
14878 *
14879 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 1 Feb 2010
14880 *
14881 * @since AIDA Stage 1
14882 */
14883 public static class FWPrecessionAngles{
14884 /** F-W angle gamma_bar (radians) */
14885 public double gamb;
14886 /** F-W angle phi_bar (radians) */
14887 public double phib;
14888 /** F-W angle psi_bar (radians) */
14889 public double psib;
14890 /** F-W angle epsilon_A (radians) */
14891 public double epsa;
14892 public FWPrecessionAngles(double gamb, double phib, double psib, double epsa) {
14893 this.gamb = gamb;
14894 this.phib = phib;
14895 this.psib = psib;
14896 this.epsa = epsa;
14897 }
14898 }
14899 /**
14900 * Precession angles, IAU 2006 (Fukushima-Williams 4-angle formulation).
14901 *
14902 *<p>This function is derived from the International Astronomical Union's
14903 * SOFA (Standards Of Fundamental Astronomy) software collection.
14904 *
14905 *<p>Status: canonical model.
14906 *
14907 *<!-- Given: -->
14908 * @param date1 double TT as a 2-part Julian Date (Note 1)
14909 * @param date2 double TT as a 2-part Julian Date (Note 1)
14910 *
14911 *<!-- Returned: -->
14912 * @return gamb double <u>returned</u> F-W angle gamma_bar (radians)
14913 * phib double <u>returned</u> F-W angle phi_bar (radians)
14914 * psib double <u>returned</u> F-W angle psi_bar (radians)
14915 * epsa double <u>returned</u> F-W angle epsilon_A (radians)
14916 *
14917 * <p>Notes:
14918 * <ol>
14919 *
14920 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
14921 * convenient way between the two arguments. For example,
14922 * JD(TT)=2450123.7 could be expressed in any of these ways,
14923 * among others:
14924 *<pre>
14925 * date1 date2
14926 *
14927 * 2450123.7 0.0 (JD method)
14928 * 2451545.0 -1421.3 (J2000 method)
14929 * 2400000.5 50123.2 (MJD method)
14930 * 2450123.5 0.2 (date & time method)
14931 *</pre>
14932 * The JD method is the most natural and convenient to use in
14933 * cases where the loss of several decimal digits of resolution
14934 * is acceptable. The J2000 method is best matched to the way
14935 * the argument is handled internally and will deliver the
14936 * optimum resolution. The MJD method and the date & time methods
14937 * are both good compromises between resolution and convenience.
14938 *
14939 * <li> Naming the following points:
14940 *
14941 * e = J2000.0 ecliptic pole,
14942 * p = GCRS pole,
14943 * E = mean ecliptic pole of date,
14944 * and P = mean pole of date,
14945 *
14946 * the four Fukushima-Williams angles are as follows:
14947 *
14948 * gamb = gamma_bar = epE
14949 * phib = phi_bar = pE
14950 * psib = psi_bar = pEP
14951 * epsa = epsilon_A = EP
14952 *
14953 * <li> The matrix representing the combined effects of frame bias and
14954 * precession is:
14955 *
14956 * PxB = R_1(-epsa).R_3(-psib).R_1(phib).R_3(gamb)
14957 *
14958 * <li> The matrix representing the combined effects of frame bias,
14959 * precession and nutation is simply:
14960 *
14961 * NxPxB = R_1(-epsa-dE).R_3(-psib-dP).R_1(phib).R_3(gamb)
14962 *
14963 * where dP and dE are the nutation components with respect to the
14964 * ecliptic of date.
14965 *</ol>
14966 *<p>Reference:
14967 *
14968 * Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351
14969 *
14970 *<p>Called:<ul>
14971 * <li>{@link #jauObl06} mean obliquity, IAU 2006
14972 * </ul>
14973 *@version 2009 December 17
14974 *
14975 * @since Release 20101201
14976 *
14977 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
14978 */
14979 public static FWPrecessionAngles jauPfw06(double date1, double date2 )
14980 {
14981 double t;
14982
14983
14984 /* Interval between fundamental date J2000.0 and given date (JC). */
14985 t = ((date1 - DJ00) + date2) / DJC;
14986
14987 /* P03 bias+precession angles. */
14988 double gamb = ( -0.052928 +
14989 ( 10.556378 +
14990 ( 0.4932044 +
14991 ( -0.00031238 +
14992 ( -0.000002788 +
14993 ( 0.0000000260 )
14994 * t) * t) * t) * t) * t) * DAS2R;
14995 double phib = ( 84381.412819 +
14996 ( -46.811016 +
14997 ( 0.0511268 +
14998 ( 0.00053289 +
14999 ( -0.000000440 +
15000 ( -0.0000000176 )
15001 * t) * t) * t) * t) * t) * DAS2R;
15002 double psib = ( -0.041775 +
15003 ( 5038.481484 +
15004 ( 1.5584175 +
15005 ( -0.00018522 +
15006 ( -0.000026452 +
15007 ( -0.0000000148 )
15008 * t) * t) * t) * t) * t) * DAS2R;
15009 double epsa = jauObl06(date1, date2);
15010
15011 return new FWPrecessionAngles(gamb, phib, psib, epsa);
15012
15013 }
15014
15015
15016 /**
15017 *<p>This function is derived from the International Astronomical Union's
15018 * SOFA (Standards Of Fundamental Astronomy) software collection.
15019 *
15020 *<p>Status: support function.
15021 *
15022 * Approximate heliocentric position and velocity of a nominated major
15023 * planet: Mercury, Venus, EMB, Mars, Jupiter, Saturn, Uranus or
15024 * Neptune (but not the Earth itself).
15025 *
15026 *<!-- Given: -->
15027 * @param date1 double TDB date part A (Note 1)
15028 * @param date2 double TDB date part B (Note 1)
15029 * @param np int planet (1=Mercury, 2=Venus, 3=EMB, 4=Mars,
15030 * 5=Jupiter, 6=Saturn, 7=Uranus, 8=Neptune)
15031 *
15032 * Returned (argument):
15033 * @param pv double[2][3] (returned) planet p,v (heliocentric, J2000.0, au,au/d)
15034 *
15035 * <!-- Returned (function value): -->
15036 * @return int status: -1 = illegal NP (outside 1-8)
15037 * 0 = OK
15038 * +1 = warning: year outside 1000-3000
15039 * +2 = warning: failed to converge
15040 *
15041 * <p>Notes:
15042 * <ol>
15043 *
15044 * <li> The date date1+date2 is in the TDB time scale (in practice TT can
15045 * be used) and is a Julian Date, apportioned in any convenient way
15046 * between the two arguments. For example, JD(TDB)=2450123.7 could
15047 * be expressed in any of these ways, among others:
15048 *<pre>
15049 * date1 date2
15050 *
15051 * 2450123.7 0.0 (JD method)
15052 * 2451545.0 -1421.3 (J2000 method)
15053 * 2400000.5 50123.2 (MJD method)
15054 * 2450123.5 0.2 (date & time method)
15055 *</pre>
15056 * The JD method is the most natural and convenient to use in cases
15057 * where the loss of several decimal digits of resolution is
15058 * acceptable. The J2000 method is best matched to the way the
15059 * argument is handled internally and will deliver the optimum
15060 * resolution. The MJD method and the date & time methods are both
15061 * good compromises between resolution and convenience. The limited
15062 * accuracy of the present algorithm is such that any of the methods
15063 * is satisfactory.
15064 *
15065 * <li> If an np value outside the range 1-8 is supplied, an error status
15066 * (function value -1) is returned and the pv vector set to zeroes.
15067 *
15068 * <li> For np=3 the result is for the Earth-Moon Barycenter. To obtain
15069 * the heliocentric position and velocity of the Earth, use instead
15070 * the JSOFA function jauEpv00.
15071 *
15072 * <li> On successful return, the array pv contains the following:
15073 *<pre>
15074 * pv[0][0] x }
15075 * pv[0][1] y } heliocentric position, au
15076 * pv[0][2] z }
15077 *
15078 * pv[1][0] xdot }
15079 * pv[1][1] ydot } heliocentric velocity, au/d
15080 * pv[1][2] zdot }
15081 *</pre>
15082 * The reference frame is equatorial and is with respect to the
15083 * mean equator and equinox of epoch J2000.0.
15084 *
15085 * <li> The algorithm is due to J.L. Simon, P. Bretagnon, J. Chapront,
15086 * M. Chapront-Touze, G. Francou and J. Laskar (Bureau des
15087 * Longitudes, Paris, France). From comparisons with JPL
15088 * ephemeris DE102, they quote the following maximum errors
15089 * over the interval 1800-2050:
15090 *<pre>
15091 * L (arcsec) B (arcsec) R (km)
15092 *
15093 * Mercury 4 1 300
15094 * Venus 5 1 800
15095 * EMB 6 1 1000
15096 * Mars 17 1 7700
15097 * Jupiter 71 5 76000
15098 * Saturn 81 13 267000
15099 * Uranus 86 7 712000
15100 * Neptune 11 1 253000
15101 *</pre>
15102 * Over the interval 1000-3000, they report that the accuracy is no
15103 * worse than 1.5 times that over 1800-2050. Outside 1000-3000 the
15104 * accuracy declines.
15105 *
15106 * Comparisons of the present function with the JPL DE200 ephemeris
15107 * give the following RMS errors over the interval 1960-2025:
15108 *<pre>
15109 * position (km) velocity (m/s)
15110 *
15111 * Mercury 334 0.437
15112 * Venus 1060 0.855
15113 * EMB 2010 0.815
15114 * Mars 7690 1.98
15115 * Jupiter 71700 7.70
15116 * Saturn 199000 19.4
15117 * Uranus 564000 16.4
15118 * Neptune 158000 14.4
15119 *</pre>
15120 * Comparisons against DE200 over the interval 1800-2100 gave the
15121 * following maximum absolute differences. (The results using
15122 * DE406 were essentially the same.)
15123 *<pre>
15124 * L (arcsec) B (arcsec) R (km) Rdot (m/s)
15125 *
15126 * Mercury 7 1 500 0.7
15127 * Venus 7 1 1100 0.9
15128 * EMB 9 1 1300 1.0
15129 * Mars 26 1 9000 2.5
15130 * Jupiter 78 6 82000 8.2
15131 * Saturn 87 14 263000 24.6
15132 * Uranus 86 7 661000 27.4
15133 * Neptune 11 2 248000 21.4
15134 *</pre>
15135 * <li> The present JSOFA re-implementation of the original Simon et al.
15136 * Fortran code differs from the original in the following respects:
15137 *<ul>
15138 * <li> C instead of Fortran.
15139 *
15140 * <li> The date is supplied in two parts.
15141 *
15142 * <li> The result is returned only in equatorial Cartesian form;
15143 * the ecliptic longitude, latitude and radius vector are not
15144 * returned.
15145 *
15146 * <li> The result is in the J2000.0 equatorial frame, not ecliptic.
15147 *
15148 * <li> More is done in-line: there are fewer calls to subroutines.
15149 *
15150 * <li> Different error/warning status values are used.
15151 *
15152 * <li> A different Kepler's-equation-solver is used (avoiding
15153 * use of double precision complex).
15154 *
15155 * <li> Polynomials in t are nested to minimize rounding errors.
15156 *
15157 * <li> Explicit double constants are used to avoid mixed-mode
15158 * expressions.
15159 *</ul>
15160 * None of the above changes affects the result significantly.
15161 *
15162 * <li> The returned status indicates the most serious condition
15163 * encountered during execution of the function. Illegal np is
15164 * considered the most serious, overriding failure to converge,
15165 * which in turn takes precedence over the remote date warning.
15166 *</ol>
15167 *<p>Called:<ul>
15168 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
15169 * </ul>
15170 *<p>Reference: Simon, J.L, Bretagnon, P., Chapront, J.,
15171 * Chapront-Touze, M., Francou, G., and Laskar, J.,
15172 * Astron. Astrophys. 282, 663 (1994).
15173 *
15174 *@version 2009 December 17
15175 *
15176 * @since Release 20101201
15177 *
15178 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
15179 */
15180 public static int jauPlan94(double date1, double date2, int np, double pv[][])
15181 {
15182 /* Gaussian constant */
15183 final double GK = 0.017202098950;
15184
15185 /* Sin and cos of J2000.0 mean obliquity (IAU 1976) */
15186 final double SINEPS = 0.3977771559319137;
15187 final double COSEPS = 0.9174820620691818;
15188
15189 /* Maximum number of iterations allowed to solve Kepler's equation */
15190 final int KMAX = 10;
15191
15192 int jstat, i, k;
15193 double t, da, dl, de, dp, di, dom, dmu, arga, argl, am,
15194 ae, dae, ae2, at, r, v, si2, xq, xp, tl, xsw,
15195 xcw, xm2, xf, ci2, xms, xmc, xpxq2, x, y, z;
15196
15197 /* Planetary inverse masses */
15198 final double amas[] = { 6023600.0, /* Mercury */
15199 408523.5, /* Venus */
15200 328900.5, /* EMB */
15201 3098710.0, /* Mars */
15202 1047.355, /* Jupiter */
15203 3498.5, /* Saturn */
15204 22869.0, /* Uranus */
15205 19314.0 }; /* Neptune */
15206
15207 /*
15208 * Tables giving the mean Keplerian elements, limited to t^2 terms:
15209 *
15210 * a semi-major axis (au)
15211 * dlm mean longitude (degree and arcsecond)
15212 * e eccentricity
15213 * pi longitude of the perihelion (degree and arcsecond)
15214 * dinc inclination (degree and arcsecond)
15215 * omega longitude of the ascending node (degree and arcsecond)
15216 */
15217
15218 final double a[][] = {
15219 { 0.3870983098, 0.0, 0.0 }, /* Mercury */
15220 { 0.7233298200, 0.0, 0.0 }, /* Venus */
15221 { 1.0000010178, 0.0, 0.0 }, /* EMB */
15222 { 1.5236793419, 3e-10, 0.0 }, /* Mars */
15223 { 5.2026032092, 19132e-10, -39e-10 }, /* Jupiter */
15224 { 9.5549091915, -0.0000213896, 444e-10 }, /* Saturn */
15225 { 19.2184460618, -3716e-10, 979e-10 }, /* Uranus */
15226 { 30.1103868694, -16635e-10, 686e-10 } /* Neptune */
15227 };
15228
15229 final double dlm[][] = {
15230 { 252.25090552, 5381016286.88982, -1.92789 },
15231 { 181.97980085, 2106641364.33548, 0.59381 },
15232 { 100.46645683, 1295977422.83429, -2.04411 },
15233 { 355.43299958, 689050774.93988, 0.94264 },
15234 { 34.35151874, 109256603.77991, -30.60378 },
15235 { 50.07744430, 43996098.55732, 75.61614 },
15236 { 314.05500511, 15424811.93933, -1.75083 },
15237 { 304.34866548, 7865503.20744, 0.21103 }
15238 };
15239
15240 final double e[][] = {
15241 { 0.2056317526, 0.0002040653, -28349e-10 },
15242 { 0.0067719164, -0.0004776521, 98127e-10 },
15243 { 0.0167086342, -0.0004203654, -0.0000126734 },
15244 { 0.0934006477, 0.0009048438, -80641e-10 },
15245 { 0.0484979255, 0.0016322542, -0.0000471366 },
15246 { 0.0555481426, -0.0034664062, -0.0000643639 },
15247 { 0.0463812221, -0.0002729293, 0.0000078913 },
15248 { 0.0094557470, 0.0000603263, 0.0 }
15249 };
15250
15251 final double pi[][] = {
15252 { 77.45611904, 5719.11590, -4.83016 },
15253 { 131.56370300, 175.48640, -498.48184 },
15254 { 102.93734808, 11612.35290, 53.27577 },
15255 { 336.06023395, 15980.45908, -62.32800 },
15256 { 14.33120687, 7758.75163, 259.95938 },
15257 { 93.05723748, 20395.49439, 190.25952 },
15258 { 173.00529106, 3215.56238, -34.09288 },
15259 { 48.12027554, 1050.71912, 27.39717 }
15260 };
15261
15262 final double dinc[][] = {
15263 { 7.00498625, -214.25629, 0.28977 },
15264 { 3.39466189, -30.84437, -11.67836 },
15265 { 0.0, 469.97289, -3.35053 },
15266 { 1.84972648, -293.31722, -8.11830 },
15267 { 1.30326698, -71.55890, 11.95297 },
15268 { 2.48887878, 91.85195, -17.66225 },
15269 { 0.77319689, -60.72723, 1.25759 },
15270 { 1.76995259, 8.12333, 0.08135 }
15271 };
15272
15273 final double omega[][] = {
15274 { 48.33089304, -4515.21727, -31.79892 },
15275 { 76.67992019, -10008.48154, -51.32614 },
15276 { 174.87317577, -8679.27034, 15.34191 },
15277 { 49.55809321, -10620.90088, -230.57416 },
15278 { 100.46440702, 6362.03561, 326.52178 },
15279 { 113.66550252, -9240.19942, -66.23743 },
15280 { 74.00595701, 2669.15033, 145.93964 },
15281 { 131.78405702, -221.94322, -0.78728 }
15282 };
15283
15284 /* Tables for trigonometric terms to be added to the mean elements of */
15285 /* the semi-major axes */
15286
15287 final double kp[][] = {
15288 { 69613, 75645, 88306, 59899, 15746, 71087, 142173, 3086, 0 },
15289 { 21863, 32794, 26934, 10931, 26250, 43725, 53867, 28939, 0 },
15290 { 16002, 21863, 32004, 10931, 14529, 16368, 15318, 32794, 0 },
15291 { 6345, 7818, 15636, 7077, 8184, 14163, 1107, 4872, 0 },
15292 { 1760, 1454, 1167, 880, 287, 2640, 19, 2047, 1454 },
15293 { 574, 0, 880, 287, 19, 1760, 1167, 306, 574 },
15294 { 204, 0, 177, 1265, 4, 385, 200, 208, 204 },
15295 { 0, 102, 106, 4, 98, 1367, 487, 204, 0 }
15296 };
15297
15298 final double ca[][] = {
15299 { 4, -13, 11, -9, -9, -3, -1, 4, 0 },
15300 { -156, 59, -42, 6, 19, -20, -10, -12, 0 },
15301 { 64, -152, 62, -8, 32, -41, 19, -11, 0 },
15302 { 124, 621, -145, 208, 54, -57, 30, 15, 0 },
15303 { -23437, -2634, 6601, 6259, -1507,-1821, 2620, -2115, -1489 },
15304 { 62911,-119919, 79336,17814,-24241,12068, 8306, -4893, 8902 },
15305 { 389061,-262125,-44088, 8387,-22976,-2093, -615, -9720, 6633 },
15306 { -412235,-157046,-31430,37817, -9740, -13, -7449, 9644, 0 }
15307 };
15308
15309 final double sa[][] = {
15310 { -29, -1, 9, 6, -6, 5, 4, 0, 0 },
15311 { -48, -125, -26, -37, 18, -13, -20, -2, 0 },
15312 { -150, -46, 68, 54, 14, 24, -28, 22, 0 },
15313 { -621, 532, -694, -20, 192, -94, 71, -73, 0 },
15314 { -14614,-19828, -5869, 1881, -4372, -2255, 782, 930, 913 },
15315 { 139737, 0, 24667, 51123, -5102, 7429, -4095, -1976, -9566 },
15316 { -138081, 0, 37205,-49039,-41901,-33872,-27037,-12474, 18797 },
15317 { 0, 28492,133236, 69654, 52322,-49577,-26430, -3593, 0 }
15318 };
15319
15320 /* Tables giving the trigonometric terms to be added to the mean */
15321 /* elements of the mean longitudes */
15322
15323 final double kq[][] = {
15324 { 3086,15746,69613,59899,75645,88306, 12661, 2658, 0, 0 },
15325 { 21863,32794,10931, 73, 4387,26934, 1473, 2157, 0, 0 },
15326 { 10,16002,21863,10931, 1473,32004, 4387, 73, 0, 0 },
15327 { 10, 6345, 7818, 1107,15636, 7077, 8184, 532, 10, 0 },
15328 { 19, 1760, 1454, 287, 1167, 880, 574, 2640, 19, 1454 },
15329 { 19, 574, 287, 306, 1760, 12, 31, 38, 19, 574 },
15330 { 4, 204, 177, 8, 31, 200, 1265, 102, 4, 204 },
15331 { 4, 102, 106, 8, 98, 1367, 487, 204, 4, 102 }
15332 };
15333
15334 final double cl[][] = {
15335 { 21, -95, -157, 41, -5, 42, 23, 30, 0, 0 },
15336 { -160, -313, -235, 60, -74, -76, -27, 34, 0, 0 },
15337 { -325, -322, -79, 232, -52, 97, 55, -41, 0, 0 },
15338 { 2268, -979, 802, 602, -668, -33, 345, 201, -55, 0 },
15339 { 7610, -4997,-7689,-5841,-2617, 1115,-748,-607, 6074, 354 },
15340 { -18549, 30125,20012, -730, 824, 23,1289,-352, -14767, -2062 },
15341 { -135245,-14594, 4197,-4030,-5630,-2898,2540,-306, 2939, 1986 },
15342 { 89948, 2103, 8963, 2695, 3682, 1648, 866,-154, -1963, -283 }
15343 };
15344
15345 final double sl[][] = {
15346 { -342, 136, -23, 62, 66, -52, -33, 17, 0, 0 },
15347 { 524, -149, -35, 117, 151, 122, -71, -62, 0, 0 },
15348 { -105, -137, 258, 35, -116, -88,-112, -80, 0, 0 },
15349 { 854, -205, -936, -240, 140, -341, -97, -232, 536, 0 },
15350 { -56980, 8016, 1012, 1448,-3024,-3710, 318, 503, 3767, 577 },
15351 { 138606,-13478,-4964, 1441,-1319,-1482, 427, 1236, -9167, -1918 },
15352 { 71234,-41116, 5334,-4935,-1848, 66, 434, -1748, 3780, -701 },
15353 { -47645, 11647, 2166, 3194, 679, 0,-244, -419, -2531, 48 }
15354 };
15355
15356 /*--------------------------------------------------------------------*/
15357
15358 /* Validate the planet number. */
15359 if ((np < 1) || (np > 8)) {
15360 jstat = -1;
15361
15362 /* Reset the result in case of failure. */
15363 for (k = 0; k < 2; k++) {
15364 for (i = 0; i < 3; i++) {
15365 pv[k][i] = 0.0;
15366 }
15367 }
15368
15369 } else {
15370
15371 /* Decrement the planet number to start at zero. */
15372 np--;
15373
15374 /* Time: Julian millennia since J2000.0. */
15375 t = ((date1 - DJ00) + date2) / DJM;
15376
15377 /* OK status unless remote date. */
15378 jstat = abs(t) <= 1.0 ? 0 : 1;
15379
15380 /* Compute the mean elements. */
15381 da = a[np][0] +
15382 (a[np][1] +
15383 a[np][2] * t) * t;
15384 dl = (3600.0 * dlm[np][0] +
15385 (dlm[np][1] +
15386 dlm[np][2] * t) * t) * DAS2R;
15387 de = e[np][0] +
15388 ( e[np][1] +
15389 e[np][2] * t) * t;
15390 dp = jauAnpm((3600.0 * pi[np][0] +
15391 (pi[np][1] +
15392 pi[np][2] * t) * t) * DAS2R);
15393 di = (3600.0 * dinc[np][0] +
15394 (dinc[np][1] +
15395 dinc[np][2] * t) * t) * DAS2R;
15396 dom = jauAnpm((3600.0 * omega[np][0] +
15397 (omega[np][1] +
15398 omega[np][2] * t) * t) * DAS2R);
15399
15400 /* Apply the trigonometric terms. */
15401 dmu = 0.35953620 * t;
15402 for (k = 0; k < 8; k++) {
15403 arga = kp[np][k] * dmu;
15404 argl = kq[np][k] * dmu;
15405 da += (ca[np][k] * cos(arga) +
15406 sa[np][k] * sin(arga)) * 1e-7;
15407 dl += (cl[np][k] * cos(argl) +
15408 sl[np][k] * sin(argl)) * 1e-7;
15409 }
15410 arga = kp[np][8] * dmu;
15411 da += t * (ca[np][8] * cos(arga) +
15412 sa[np][8] * sin(arga)) * 1e-7;
15413 for (k = 8; k < 10; k++) {
15414 argl = kq[np][k] * dmu;
15415 dl += t * (cl[np][k] * cos(argl) +
15416 sl[np][k] * sin(argl)) * 1e-7;
15417 }
15418 dl = fmod(dl, D2PI);
15419
15420 /* Iterative soln. of Kepler's equation to get eccentric anomaly. */
15421 am = dl - dp;
15422 ae = am + de * sin(am);
15423 k = 0;
15424 dae = 1.0;
15425 while (k < KMAX && abs(dae) > 1e-12) {
15426 dae = (am - ae + de * sin(ae)) / (1.0 - de * cos(ae));
15427 ae += dae;
15428 k++;
15429 if (k == KMAX-1) jstat = 2;
15430 }
15431
15432 /* True anomaly. */
15433 ae2 = ae / 2.0;
15434 at = 2.0 * atan2(sqrt((1.0 + de) / (1.0 - de)) * sin(ae2),
15435 cos(ae2));
15436
15437 /* Distance (au) and speed (radians per day). */
15438 r = da * (1.0 - de * cos(ae));
15439 v = GK * sqrt((1.0 + 1.0 / amas[np]) / (da * da * da));
15440
15441 si2 = sin(di / 2.0);
15442 xq = si2 * cos(dom);
15443 xp = si2 * sin(dom);
15444 tl = at + dp;
15445 xsw = sin(tl);
15446 xcw = cos(tl);
15447 xm2 = 2.0 * (xp * xcw - xq * xsw);
15448 xf = da / sqrt(1 - de * de);
15449 ci2 = cos(di / 2.0);
15450 xms = (de * sin(dp) + xsw) * xf;
15451 xmc = (de * cos(dp) + xcw) * xf;
15452 xpxq2 = 2 * xp * xq;
15453
15454 /* Position (J2000.0 ecliptic x,y,z in au). */
15455 x = r * (xcw - xm2 * xp);
15456 y = r * (xsw + xm2 * xq);
15457 z = r * (-xm2 * ci2);
15458
15459 /* Rotate to equatorial. */
15460 pv[0][0] = x;
15461 pv[0][1] = y * COSEPS - z * SINEPS;
15462 pv[0][2] = y * SINEPS + z * COSEPS;
15463
15464 /* Velocity (J2000.0 ecliptic xdot,ydot,zdot in au/d). */
15465 x = v * (( -1.0 + 2.0 * xp * xp) * xms + xpxq2 * xmc);
15466 y = v * (( 1.0 - 2.0 * xq * xq) * xmc - xpxq2 * xms);
15467 z = v * (2.0 * ci2 * (xp * xms + xq * xmc));
15468
15469 /* Rotate to equatorial. */
15470 pv[1][0] = x;
15471 pv[1][1] = y * COSEPS - z * SINEPS;
15472 pv[1][2] = y * SINEPS + z * COSEPS;
15473
15474 }
15475
15476 /* Return the status. */
15477 return jstat;
15478
15479 }
15480
15481
15482 /**
15483 * Modulus of p-vector.
15484 *
15485 *<p>This function is derived from the International Astronomical Union's
15486 * SOFA (Standards Of Fundamental Astronomy) software collection.
15487 *
15488 *<p>Status: vector/matrix support function.
15489 *
15490 *<!-- Given: -->
15491 * @param p double[3] p-vector
15492 *
15493 * <!-- Returned (function value): -->
15494 * @return double modulus
15495 *
15496 *@version 2008 May 22
15497 *
15498 * @since Release 20101201
15499 *
15500 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
15501 */
15502 public static double jauPm(double p[] )
15503 {
15504 double w;
15505
15506
15507 w = sqrt( p[0] * p[0]
15508 + p[1] * p[1]
15509 + p[2] * p[2] );
15510
15511 return w;
15512
15513 }
15514
15515
15516 /**
15517 * Precession matrix (including frame bias) from GCRS to a specified
15518 * date, IAU 2000 model.
15519 *
15520 *<p>This function is derived from the International Astronomical Union's
15521 * SOFA (Standards Of Fundamental Astronomy) software collection.
15522 *
15523 *<p>Status: support function.
15524 *
15525 *<!-- Given: -->
15526 * @param date1 double TT as a 2-part Julian Date (Note 1)
15527 * @param date2 double TT as a 2-part Julian Date (Note 1)
15528 *
15529 *<!-- Returned: -->
15530 * @return rbp double[3][3] <u>returned</u> bias-precession matrix (Note 2)
15531 *
15532 * <p>Notes:
15533 * <ol>
15534 *
15535 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
15536 * convenient way between the two arguments. For example,
15537 * JD(TT)=2450123.7 could be expressed in any of these ways,
15538 * among others:
15539 *<pre>
15540 * date1 date2
15541 *
15542 * 2450123.7 0.0 (JD method)
15543 * 2451545.0 -1421.3 (J2000 method)
15544 * 2400000.5 50123.2 (MJD method)
15545 * 2450123.5 0.2 (date & time method)
15546 *</pre>
15547 * The JD method is the most natural and convenient to use in
15548 * cases where the loss of several decimal digits of resolution
15549 * is acceptable. The J2000 method is best matched to the way
15550 * the argument is handled internally and will deliver the
15551 * optimum resolution. The MJD method and the date & time methods
15552 * are both good compromises between resolution and convenience.
15553 *
15554 * <li> The matrix operates in the sense V(date) = rbp * V(GCRS), where
15555 * the p-vector V(GCRS) is with respect to the Geocentric Celestial
15556 * Reference System (IAU, 2000) and the p-vector V(date) is with
15557 * respect to the mean equatorial triad of the given date.
15558 *</ol>
15559 *<p>Called:<ul>
15560 * <li>{@link #jauBp00} frame bias and precession matrices, IAU 2000
15561 * </ul>
15562 *<p>Reference:
15563 *
15564 * IAU: Trans. International Astronomical Union, Vol. XXIVB; Proc.
15565 * 24th General Assembly, Manchester, UK. Resolutions B1.3, B1.6.
15566 * (2000)
15567 *
15568 *@version 2009 December 21
15569 *
15570 * @since Release 20101201
15571 *
15572 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
15573 */
15574 public static double[][] jauPmat00(double date1, double date2)
15575 {
15576 double rb[][] = new double[3][3], rp[][] = new double[3][3],
15577 rbp[][] = new double[3][3];
15578 /* Obtain the required matrix (discarding others). */
15579 jauBp00(date1, date2, rb, rp, rbp);
15580
15581 return rbp;
15582
15583 }
15584
15585
15586 /**
15587 * Precession matrix (including frame bias) from GCRS to a specified
15588 * date, IAU 2006 model.
15589 *
15590 *<p>This function is derived from the International Astronomical Union's
15591 * SOFA (Standards Of Fundamental Astronomy) software collection.
15592 *
15593 *<p>Status: support function.
15594 *
15595 *<!-- Given: -->
15596 * @param date1 double TT as a 2-part Julian Date (Note 1)
15597 * @param date2 double TT as a 2-part Julian Date (Note 1)
15598 *
15599 *<!-- Returned: -->
15600 * @return rbp double[3][3] <u>returned</u> bias-precession matrix (Note 2)
15601 *
15602 * <p>Notes:
15603 * <ol>
15604 *
15605 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
15606 * convenient way between the two arguments. For example,
15607 * JD(TT)=2450123.7 could be expressed in any of these ways,
15608 * among others:
15609 *<pre>
15610 * date1 date2
15611 *
15612 * 2450123.7 0.0 (JD method)
15613 * 2451545.0 -1421.3 (J2000 method)
15614 * 2400000.5 50123.2 (MJD method)
15615 * 2450123.5 0.2 (date & time method)
15616 *</pre>
15617 * The JD method is the most natural and convenient to use in
15618 * cases where the loss of several decimal digits of resolution
15619 * is acceptable. The J2000 method is best matched to the way
15620 * the argument is handled internally and will deliver the
15621 * optimum resolution. The MJD method and the date & time methods
15622 * are both good compromises between resolution and convenience.
15623 *
15624 * <li> The matrix operates in the sense V(date) = rbp * V(GCRS), where
15625 * the p-vector V(GCRS) is with respect to the Geocentric Celestial
15626 * Reference System (IAU, 2000) and the p-vector V(date) is with
15627 * respect to the mean equatorial triad of the given date.
15628 *</ol>
15629 *<p>Called:<ul>
15630 * <li>{@link #jauPfw06} bias-precession F-W angles, IAU 2006
15631 * <li>{@link #jauFw2m} F-W angles to r-matrix
15632 * </ul>
15633 *<p>References:
15634 *
15635 * <p>Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855
15636 *
15637 * <p>Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981
15638 *
15639 *@version 2009 December 21
15640 *
15641 * @since Release 20101201
15642 *
15643 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
15644 */
15645 public static double[][] jauPmat06(double date1, double date2)
15646 {
15647
15648 /* Bias-precession Fukushima-Williams angles. */
15649 FWPrecessionAngles fw = jauPfw06(date1, date2);
15650
15651 /* Form the matrix. */
15652 double[][] rbp = jauFw2m(fw.gamb, fw.phib, fw.psib, fw.epsa );
15653
15654 return rbp;
15655
15656 }
15657
15658
15659 /**
15660 * Precession matrix from J2000.0 to a specified date, IAU 1976 model.
15661 *
15662 *<p>This function is derived from the International Astronomical Union's
15663 * SOFA (Standards Of Fundamental Astronomy) software collection.
15664 *
15665 *<p>Status: support function.
15666 *
15667 *<!-- Given: -->
15668 * @param date1 double ending date, TT (Note 1)
15669 * @param date2 double ending date, TT (Note 1)
15670 *
15671 *<!-- Returned: -->
15672 * @return rmatp double[3][3] <u>returned</u> precession matrix, J2000.0 -> date1+date2
15673 *
15674 * <p>Notes:
15675 * <ol>
15676 *
15677 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
15678 * convenient way between the two arguments. For example,
15679 * JD(TT)=2450123.7 could be expressed in any of these ways,
15680 * among others:
15681 *<pre>
15682 * date1 date2
15683 *
15684 * 2450123.7 0.0 (JD method)
15685 * 2451545.0 -1421.3 (J2000 method)
15686 * 2400000.5 50123.2 (MJD method)
15687 * 2450123.5 0.2 (date & time method)
15688 *</pre>
15689 * The JD method is the most natural and convenient to use in
15690 * cases where the loss of several decimal digits of resolution
15691 * is acceptable. The J2000 method is best matched to the way
15692 * the argument is handled internally and will deliver the
15693 * optimum resolution. The MJD method and the date & time methods
15694 * are both good compromises between resolution and convenience.
15695 *
15696 * <li> The matrix operates in the sense V(date) = RMATP * V(J2000),
15697 * where the p-vector V(J2000) is with respect to the mean
15698 * equatorial triad of epoch J2000.0 and the p-vector V(date)
15699 * is with respect to the mean equatorial triad of the given
15700 * date.
15701 *
15702 * <li> Though the matrix method itself is rigorous, the precession
15703 * angles are expressed through canonical polynomials which are
15704 * valid only for a limited time span. In addition, the IAU 1976
15705 * precession rate is known to be imperfect. The absolute accuracy
15706 * of the present formulation is better than 0.1 arcsec from
15707 * 1960AD to 2040AD, better than 1 arcsec from 1640AD to 2360AD,
15708 * and remains below 3 arcsec for the whole of the period
15709 * 500BC to 3000AD. The errors exceed 10 arcsec outside the
15710 * range 1200BC to 3900AD, exceed 100 arcsec outside 4200BC to
15711 * 5600AD and exceed 1000 arcsec outside 6800BC to 8200AD.
15712 *</ol>
15713 *<p>Called:<ul>
15714 * <li>{@link #jauPrec76} accumulated precession angles, IAU 1976
15715 * <li>{@link #jauIr} initialize r-matrix to identity
15716 * <li>{@link #jauRz} rotate around Z-axis
15717 * <li>{@link #jauRy} rotate around Y-axis
15718 * <li>{@link #jauCr} copy r-matrix
15719 * </ul>
15720 *<p>References:
15721 *
15722 * <p>Lieske, J.H., 1979, Astron.Astrophys. 73, 282.
15723 * equations (6) & (7), p283.
15724 *
15725 * Kaplan,G.H., 1981. USNO circular no. 163, pA2.
15726 *
15727 *@version 2009 December 18
15728 *
15729 * @since Release 20101201
15730 *
15731 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
15732 */
15733 public static double[][] jauPmat76(double date1, double date2)
15734 {
15735 double wmat[][] = new double[3][3];
15736 double rmatp[][] = new double[3][3];
15737
15738 /* Precession Euler angles, J2000.0 to specified date. */
15739 EulerAngles euler = jauPrec76(DJ00, 0.0, date1, date2);
15740
15741 /* Form the rotation matrix. */
15742 jauIr( wmat);
15743 jauRz( -euler.zeta, wmat);
15744 jauRy( euler.theta, wmat);
15745 jauRz( -euler.z, wmat);
15746 jauCr(wmat, rmatp);
15747
15748 return rmatp;
15749
15750 }
15751
15752
15753 /**
15754 * P-vector subtraction.
15755 *
15756 *<p>This function is derived from the International Astronomical Union's
15757 * SOFA (Standards Of Fundamental Astronomy) software collection.
15758 *
15759 *<p>Status: vector/matrix support function.
15760 *
15761 *<!-- Given: -->
15762 * @param a double[3] first p-vector
15763 * @param b double[3] second p-vector
15764 *
15765 *<!-- Returned: -->
15766 * @return amb double[3] <u>returned</u> a - b
15767 *
15768 * Note:
15769 * It is permissible to re-use the same array for any of the
15770 * arguments.
15771 *
15772 *@version 2008 November 18
15773 *
15774 * @since Release 20101201
15775 *
15776 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
15777 */
15778 public static double[] jauPmp(double a[] , double b[] )
15779 {
15780 double amb[] = new double[3];
15781 amb[0] = a[0] - b[0];
15782 amb[1] = a[1] - b[1];
15783 amb[2] = a[2] - b[2];
15784
15785 return amb;
15786
15787 }
15788
15789 /**
15790 * A normalized vector with r being the modulus and u[3] being the unit vector.
15791 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 1 Feb 2010
15792 *
15793 * @since AIDA Stage 1
15794 */
15795 public static class NormalizedVector {
15796 public double r;
15797 public double u[];
15798 public NormalizedVector(double r, double u[] ) {
15799 this.r = r;
15800 this.u = u;
15801 }
15802 }
15803 /**
15804 * Convert a p-vector into modulus and unit vector.
15805 *
15806 *<p>This function is derived from the International Astronomical Union's
15807 * SOFA (Standards Of Fundamental Astronomy) software collection.
15808 *
15809 *<p>Status: vector/matrix support function.
15810 *
15811 *<!-- Given: -->
15812 * @param p double[3] p-vector
15813 *
15814 *<!-- Returned: -->
15815 * @return r double <u>returned</u> modulus
15816 * u double[3] <u>returned</u> unit vector
15817 *
15818 * <p>Notes:
15819 * <ol>
15820 *
15821 * <li> If p is null, the result is null. Otherwise the result is a unit
15822 * vector.
15823 *
15824 * <li> It is permissible to re-use the same array for any of the
15825 * arguments.
15826 *</ol>
15827 *<p>Called:<ul>
15828 * <li>{@link #jauPm} modulus of p-vector
15829 * <li>{@link #jauZp} zero p-vector
15830 * <li>{@link #jauSxp} multiply p-vector by scalar
15831 * </ul>
15832 *@version 2008 November 18
15833 *
15834 * @since Release 20101201
15835 *
15836 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
15837 */
15838 public static NormalizedVector jauPn(double p[])
15839 {
15840 double w;
15841
15842 /* Obtain the modulus and test for zero. */
15843 w = jauPm(p);
15844 NormalizedVector nv = new NormalizedVector(w, new double[3]);
15845 if (w == 0.0) {
15846
15847 /* Null vector. */
15848 jauZp(nv.u);
15849
15850 } else {
15851
15852 /* Unit vector. */
15853 nv.u = jauSxp(1.0/w, p);
15854 }
15855
15856
15857 return nv;
15858
15859 }
15860
15861
15862 /**
15863 * Precession-nutation, IAU 2000 model: a multi-purpose function,
15864 * supporting classical (equinox-based) use directly and CIO-based
15865 * use indirectly.
15866 *
15867 *<p>This function is derived from the International Astronomical Union's
15868 * SOFA (Standards Of Fundamental Astronomy) software collection.
15869 *
15870 *<p>Status: support function.
15871 *
15872 *<!-- Given: -->
15873 * @param date1 double TT as a 2-part Julian Date (Note 1)
15874 * @param date2 double TT as a 2-part Julian Date (Note 1)
15875 * @param dpsi double nutation (Note 2)
15876 * @param deps double nutation (Note 2)
15877 *
15878 *<!-- Returned: -->
15879 * @return epsa double <u>returned</u> mean obliquity (Note 3),
15880 * rb double[3][3] <u>returned</u> frame bias matrix (Note 4),
15881 * rp double[3][3] <u>returned</u> precession matrix (Note 5),
15882 * rbp double[3][3] <u>returned</u> bias-precession matrix (Note 6),
15883 * rn double[3][3] <u>returned</u> nutation matrix (Note 7),
15884 * rbpn double[3][3] <u>returned</u> GCRS-to-true matrix (Note 8)
15885 *
15886 * <p>Notes:
15887 * <ol>
15888 *
15889 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
15890 * convenient way between the two arguments. For example,
15891 * JD(TT)=2450123.7 could be expressed in any of these ways,
15892 * among others:
15893 *<pre>
15894 * date1 date2
15895 *
15896 * 2450123.7 0.0 (JD method)
15897 * 2451545.0 -1421.3 (J2000 method)
15898 * 2400000.5 50123.2 (MJD method)
15899 * 2450123.5 0.2 (date & time method)
15900 *</pre>
15901 * The JD method is the most natural and convenient to use in
15902 * cases where the loss of several decimal digits of resolution
15903 * is acceptable. The J2000 method is best matched to the way
15904 * the argument is handled internally and will deliver the
15905 * optimum resolution. The MJD method and the date & time methods
15906 * are both good compromises between resolution and convenience.
15907 *
15908 * <li> The caller is responsible for providing the nutation components;
15909 * they are in longitude and obliquity, in radians and are with
15910 * respect to the equinox and ecliptic of date. For high-accuracy
15911 * applications, free core nutation should be included as well as
15912 * any other relevant corrections to the position of the CIP.
15913 *
15914 * <li> The returned mean obliquity is consistent with the IAU 2000
15915 * precession-nutation models.
15916 *
15917 * <li> The matrix rb transforms vectors from GCRS to J2000.0 mean
15918 * equator and equinox by applying frame bias.
15919 *
15920 * <li> The matrix rp transforms vectors from J2000.0 mean equator and
15921 * equinox to mean equator and equinox of date by applying
15922 * precession.
15923 *
15924 * <li> The matrix rbp transforms vectors from GCRS to mean equator and
15925 * equinox of date by applying frame bias then precession. It is
15926 * the product rp x rb.
15927 *
15928 * <li> The matrix rn transforms vectors from mean equator and equinox of
15929 * date to true equator and equinox of date by applying the nutation
15930 * (luni-solar + planetary).
15931 *
15932 * <li> The matrix rbpn transforms vectors from GCRS to true equator and
15933 * equinox of date. It is the product rn x rbp, applying frame
15934 * bias, precession and nutation in that order.
15935 *
15936 * <li> It is permissible to re-use the same array in the returned
15937 * arguments. The arrays are filled in the order given.
15938 *</ol>
15939 *<p>Called:<ul>
15940 * <li>{@link #jauPr00} IAU 2000 precession adjustments
15941 * <li>{@link #jauObl80} mean obliquity, IAU 1980
15942 * <li>{@link #jauBp00} frame bias and precession matrices, IAU 2000
15943 * <li>{@link #jauCr} copy r-matrix
15944 * <li>{@link #jauNumat} form nutation matrix
15945 * <li>{@link #jauRxr} product of two r-matrices
15946 * </ul>
15947 *<p>Reference:
15948 *
15949 * <p>Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
15950 * "Expressions for the Celestial Intermediate Pole and Celestial
15951 * Ephemeris Origin consistent with the IAU 2000A precession-
15952 * nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
15953 *
15954 * n.b. The celestial ephemeris origin (CEO) was renamed "celestial
15955 * intermediate origin" (CIO) by IAU 2006 Resolution 2.
15956 *
15957 *@version 2010 January 18
15958 *
15959 * @since Release 20101201
15960 *
15961 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
15962 */
15963 public static PrecessionNutation jauPn00(double date1, double date2, double dpsi, double deps)
15964 {
15965 double rbpw[][] = new double[3][3], rnw[][] = new double[3][3];
15966 double[][] rb = new double[3][3];
15967 double[][] rp = new double[3][3];
15968 double[][] rbp = new double[3][3];
15969 double[][] rn = new double[3][3];
15970 double[][] rbpn = new double[3][3];
15971
15972
15973 /* IAU 2000 precession-rate adjustments. */
15974 PrecessionDeltaTerms nut = jauPr00(date1, date2);
15975
15976 /* Mean obliquity, consistent with IAU 2000 precession-nutation. */
15977 double epsa = jauObl80(date1, date2) + nut.depspr;
15978
15979 /* Frame bias and precession matrices and their product. */
15980 jauBp00(date1, date2, rb, rp, rbpw);
15981 jauCr(rbpw, rbp);
15982
15983 /* Nutation matrix. */
15984 rnw = jauNumat(epsa, dpsi, deps);
15985 jauCr(rnw, rn);
15986
15987 /* Bias-precession-nutation matrix (classical). */
15988 rbpn = jauRxr(rnw, rbpw);
15989
15990 return new PrecessionNutation(dpsi, deps, epsa, rb, rp, rbp, rn, rbpn);
15991
15992 }
15993
15994
15995 /**
15996 * Precession-nutation model.
15997 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
15998 *
15999 * @since AIDA Stage 1
16000 */
16001 public static class PrecessionNutation {
16002 public NutationTerms nut;
16003 /** mean obliquity */
16004 public double epsa;
16005 /** frame bias matrix */
16006 public double rb[][];
16007 /** precession matrix */
16008 public double rp[][];
16009 /** bias-precession matrix */
16010 public double rbp[][];
16011 /** nutation matrix */
16012 public double rn[][];
16013 /** GCRS-to-true matrix */
16014 public double rbpn[][];
16015 public PrecessionNutation(double dpsi, double deps, double epsa,
16016 double rb[][], double rp[][], double rbp[][],
16017 double rn[][], double rbpn[][]){
16018 this.nut = new NutationTerms(dpsi, deps);
16019 this.epsa = epsa;
16020 this.rb = rb;
16021 this.rp = rp;
16022 this.rbp = rbp;
16023 this.rn = rn;
16024 this.rbpn = rbpn;
16025 }
16026
16027 }
16028 /**
16029 * Precession-nutation, IAU 2000A model: a multi-purpose function,
16030 * supporting classical (equinox-based) use directly and CIO-based
16031 * use indirectly.
16032 *
16033 *<p>This function is derived from the International Astronomical Union's
16034 * SOFA (Standards Of Fundamental Astronomy) software collection.
16035 *
16036 *<p>Status: support function.
16037 *
16038 *<!-- Given: -->
16039 * @param date1 double TT as a 2-part Julian Date (Note 1)
16040 * @param date2 double TT as a 2-part Julian Date (Note 1)
16041 *
16042 *<!-- Returned: -->
16043 * @return dpsi double <u>returned</u> nutation (Note 2)
16044 * deps double <u>returned</u> nutation (Note 2)
16045 * epsa double <u>returned</u> mean obliquity (Note 3)
16046 * rb double[3][3] <u>returned</u> frame bias matrix (Note 4)
16047 * rp double[3][3] <u>returned</u> precession matrix (Note 5)
16048 * rbp double[3][3] <u>returned</u> bias-precession matrix (Note 6)
16049 * rn double[3][3] <u>returned</u> nutation matrix (Note 7)
16050 * rbpn double[3][3] <u>returned</u> GCRS-to-true matrix (Notes 8,9)
16051 *
16052 * <p>Notes:
16053 * <ol>
16054 *
16055 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
16056 * convenient way between the two arguments. For example,
16057 * JD(TT)=2450123.7 could be expressed in any of these ways,
16058 * among others:
16059 *<pre>
16060 * date1 date2
16061 *
16062 * 2450123.7 0.0 (JD method)
16063 * 2451545.0 -1421.3 (J2000 method)
16064 * 2400000.5 50123.2 (MJD method)
16065 * 2450123.5 0.2 (date & time method)
16066 *</pre>
16067 * The JD method is the most natural and convenient to use in
16068 * cases where the loss of several decimal digits of resolution
16069 * is acceptable. The J2000 method is best matched to the way
16070 * the argument is handled internally and will deliver the
16071 * optimum resolution. The MJD method and the date & time methods
16072 * are both good compromises between resolution and convenience.
16073 *
16074 * <li> The nutation components (luni-solar + planetary, IAU 2000A) in
16075 * longitude and obliquity are in radians and with respect to the
16076 * equinox and ecliptic of date. Free core nutation is omitted;
16077 * for the utmost accuracy, use the jauPn00 function, where the
16078 * nutation components are caller-specified. For faster but
16079 * slightly less accurate results, use the jauPn00b function.
16080 *
16081 * <li> The mean obliquity is consistent with the IAU 2000 precession.
16082 *
16083 * <li> The matrix rb transforms vectors from GCRS to J2000.0 mean
16084 * equator and equinox by applying frame bias.
16085 *
16086 * <li> The matrix rp transforms vectors from J2000.0 mean equator and
16087 * equinox to mean equator and equinox of date by applying
16088 * precession.
16089 *
16090 * <li> The matrix rbp transforms vectors from GCRS to mean equator and
16091 * equinox of date by applying frame bias then precession. It is
16092 * the product rp x rb.
16093 *
16094 * <li> The matrix rn transforms vectors from mean equator and equinox
16095 * of date to true equator and equinox of date by applying the
16096 * nutation (luni-solar + planetary).
16097 *
16098 * <li> The matrix rbpn transforms vectors from GCRS to true equator and
16099 * equinox of date. It is the product rn x rbp, applying frame
16100 * bias, precession and nutation in that order.
16101 *
16102 * <li> The X,Y,Z coordinates of the IAU 2000A Celestial Intermediate
16103 * Pole are elements (3,1-3) of the GCRS-to-true matrix,
16104 * i.e. rbpn[2][0-2].
16105 *
16106 * <li> It is permissible to re-use the same array in the returned
16107 * arguments. The arrays are filled in the order given.
16108 *</ol>
16109 *<p>Called:<ul>
16110 * <li>{@link #jauNut00a} nutation, IAU 2000A
16111 * <li>{@link #jauPn00} bias/precession/nutation results, IAU 2000
16112 * </ul>
16113 *<p>Reference:
16114 *
16115 * <p>Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
16116 * "Expressions for the Celestial Intermediate Pole and Celestial
16117 * Ephemeris Origin consistent with the IAU 2000A precession-
16118 * nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
16119 *
16120 * n.b. The celestial ephemeris origin (CEO) was renamed "celestial
16121 * intermediate origin" (CIO) by IAU 2006 Resolution 2.
16122 *
16123 *@version 2010 January 18
16124 *
16125 * @since Release 20101201
16126 *
16127 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
16128 */
16129 public static PrecessionNutation jauPn00a(double date1, double date2)
16130 {
16131 /* Nutation. */
16132 NutationTerms nut = jauNut00a(date1, date2);
16133
16134 /* Remaining results. */
16135 return jauPn00(date1, date2, nut.dpsi, nut.deps);
16136
16137
16138 }
16139
16140
16141 /**
16142 * Precession-nutation, IAU 2000B model: a multi-purpose function,
16143 * supporting classical (equinox-based) use directly and CIO-based
16144 * use indirectly.
16145 *
16146 *<p>This function is derived from the International Astronomical Union's
16147 * SOFA (Standards Of Fundamental Astronomy) software collection.
16148 *
16149 *<p>Status: support function.
16150 *
16151 *<!-- Given: -->
16152 * @param date1 double TT as a 2-part Julian Date (Note 1)
16153 * @param date2 double TT as a 2-part Julian Date (Note 1)
16154 *
16155 *<!-- Returned: -->
16156 * @return dpsi,deps double <u>returned</u> nutation (Note 2)
16157 * epsa double <u>returned</u> mean obliquity (Note 3)
16158 * rb double[3][3] <u>returned</u> frame bias matrix (Note 4)
16159 * rp double[3][3] <u>returned</u> precession matrix (Note 5)
16160 * rbp double[3][3] <u>returned</u> bias-precession matrix (Note 6)
16161 * rn double[3][3] <u>returned</u> nutation matrix (Note 7)
16162 * rbpn double[3][3] <u>returned</u> GCRS-to-true matrix (Notes 8,9)
16163 *
16164 * <p>Notes:
16165 * <ol>
16166 *
16167 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
16168 * convenient way between the two arguments. For example,
16169 * JD(TT)=2450123.7 could be expressed in any of these ways,
16170 * among others:
16171 *<pre>
16172 * date1 date2
16173 *
16174 * 2450123.7 0.0 (JD method)
16175 * 2451545.0 -1421.3 (J2000 method)
16176 * 2400000.5 50123.2 (MJD method)
16177 * 2450123.5 0.2 (date & time method)
16178 *</pre>
16179 * The JD method is the most natural and convenient to use in
16180 * cases where the loss of several decimal digits of resolution
16181 * is acceptable. The J2000 method is best matched to the way
16182 * the argument is handled internally and will deliver the
16183 * optimum resolution. The MJD method and the date & time methods
16184 * are both good compromises between resolution and convenience.
16185 *
16186 * <li> The nutation components (luni-solar + planetary, IAU 2000B) in
16187 * longitude and obliquity are in radians and with respect to the
16188 * equinox and ecliptic of date. For more accurate results, but
16189 * at the cost of increased computation, use the jauPn00a function.
16190 * For the utmost accuracy, use the jauPn00 function, where the
16191 * nutation components are caller-specified.
16192 *
16193 * <li> The mean obliquity is consistent with the IAU 2000 precession.
16194 *
16195 * <li> The matrix rb transforms vectors from GCRS to J2000.0 mean
16196 * equator and equinox by applying frame bias.
16197 *
16198 * <li> The matrix rp transforms vectors from J2000.0 mean equator and
16199 * equinox to mean equator and equinox of date by applying
16200 * precession.
16201 *
16202 * <li> The matrix rbp transforms vectors from GCRS to mean equator and
16203 * equinox of date by applying frame bias then precession. It is
16204 * the product rp x rb.
16205 *
16206 * <li> The matrix rn transforms vectors from mean equator and equinox
16207 * of date to true equator and equinox of date by applying the
16208 * nutation (luni-solar + planetary).
16209 *
16210 * <li> The matrix rbpn transforms vectors from GCRS to true equator and
16211 * equinox of date. It is the product rn x rbp, applying frame
16212 * bias, precession and nutation in that order.
16213 *
16214 * <li> The X,Y,Z coordinates of the IAU 2000B Celestial Intermediate
16215 * Pole are elements (3,1-3) of the matrix rbpn.
16216 *
16217 * <li> It is permissible to re-use the same array in the returned
16218 * arguments. The arrays are filled in the stated order.
16219 *</ol>
16220 *<p>Called:<ul>
16221 * <li>{@link #jauNut00b} nutation, IAU 2000B
16222 * <li>{@link #jauPn00} bias/precession/nutation results, IAU 2000
16223 * </ul>
16224 *<p>Reference:
16225 *
16226 * <p>Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
16227 * "Expressions for the Celestial Intermediate Pole and Celestial
16228 * Ephemeris Origin consistent with the IAU 2000A precession-
16229 * nutation model", Astron.Astrophys. 400, 1145-1154 (2003).
16230 *
16231 * n.b. The celestial ephemeris origin (CEO) was renamed "celestial
16232 * intermediate origin" (CIO) by IAU 2006 Resolution 2.
16233 *
16234 *@version 2010 January 18
16235 *
16236 * @since Release 20101201
16237 *
16238 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
16239 */
16240 public static PrecessionNutation jauPn00b(double date1, double date2)
16241 {
16242 /* Nutation. */
16243 NutationTerms nut = jauNut00b(date1, date2);
16244
16245 /* Remaining results. */
16246 return jauPn00(date1, date2, nut.dpsi, nut.deps);
16247
16248
16249 }
16250
16251
16252 /**
16253 * Precession-nutation, IAU 2006 model: a multi-purpose function,
16254 * supporting classical (equinox-based) use directly and CIO-based use
16255 * indirectly.
16256 *
16257 *<p>This function is derived from the International Astronomical Union's
16258 * SOFA (Standards Of Fundamental Astronomy) software collection.
16259 *
16260 *<p>Status: support function.
16261 *
16262 *<!-- Given: -->
16263 * @param date1 double TT as a 2-part Julian Date (Note 1)
16264 * @param date2 double TT as a 2-part Julian Date (Note 1)
16265 * @param dpsi double nutation (Note 2)
16266 * @param deps double nutation (Note 2)
16267 *
16268 *<!-- Returned: -->
16269 * @return epsa double <u>returned</u> mean obliquity (Note 3)
16270 * rb double[3][3] <u>returned</u> frame bias matrix (Note 4)
16271 * rp double[3][3] <u>returned</u> precession matrix (Note 5)
16272 * rbp double[3][3] <u>returned</u> bias-precession matrix (Note 6)
16273 * rn double[3][3] <u>returned</u> nutation matrix (Note 7)
16274 * rbpn double[3][3] <u>returned</u> GCRS-to-true matrix (Note 8)
16275 *
16276 * <p>Notes:
16277 * <ol>
16278 *
16279 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
16280 * convenient way between the two arguments. For example,
16281 * JD(TT)=2450123.7 could be expressed in any of these ways,
16282 * among others:
16283 *<pre>
16284 * date1 date2
16285 *
16286 * 2450123.7 0.0 (JD method)
16287 * 2451545.0 -1421.3 (J2000 method)
16288 * 2400000.5 50123.2 (MJD method)
16289 * 2450123.5 0.2 (date & time method)
16290 *</pre>
16291 * The JD method is the most natural and convenient to use in
16292 * cases where the loss of several decimal digits of resolution
16293 * is acceptable. The J2000 method is best matched to the way
16294 * the argument is handled internally and will deliver the
16295 * optimum resolution. The MJD method and the date & time methods
16296 * are both good compromises between resolution and convenience.
16297 *
16298 * <li> The caller is responsible for providing the nutation components;
16299 * they are in longitude and obliquity, in radians and are with
16300 * respect to the equinox and ecliptic of date. For high-accuracy
16301 * applications, free core nutation should be included as well as
16302 * any other relevant corrections to the position of the CIP.
16303 *
16304 * <li> The returned mean obliquity is consistent with the IAU 2006
16305 * precession.
16306 *
16307 * <li> The matrix rb transforms vectors from GCRS to J2000.0 mean
16308 * equator and equinox by applying frame bias.
16309 *
16310 * <li> The matrix rp transforms vectors from J2000.0 mean equator and
16311 * equinox to mean equator and equinox of date by applying
16312 * precession.
16313 *
16314 * <li> The matrix rbp transforms vectors from GCRS to mean equator and
16315 * equinox of date by applying frame bias then precession. It is
16316 * the product rp x rb.
16317 *
16318 * <li> The matrix rn transforms vectors from mean equator and equinox
16319 * of date to true equator and equinox of date by applying the
16320 * nutation (luni-solar + planetary).
16321 *
16322 * <li> The matrix rbpn transforms vectors from GCRS to true equator and
16323 * equinox of date. It is the product rn x rbp, applying frame
16324 * bias, precession and nutation in that order.
16325 *
16326 * <li> The X,Y,Z coordinates of the IAU 2000B Celestial Intermediate
16327 * Pole are elements (3,1-3) of the matrix rbpn.
16328 *
16329 * <li> It is permissible to re-use the same array in the returned
16330 * arguments. The arrays are filled in the stated order.
16331 *</ol>
16332 *<p>Called:<ul>
16333 * <li>{@link #jauPfw06} bias-precession F-W angles, IAU 2006
16334 * <li>{@link #jauFw2m} F-W angles to r-matrix
16335 * <li>{@link #jauCr} copy r-matrix
16336 * <li>{@link #jauTr} transpose r-matrix
16337 * <li>{@link #jauRxr} product of two r-matrices
16338 * </ul>
16339 *<p>References:
16340 *
16341 * <p>Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855
16342 *
16343 * <p>Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981
16344 *
16345 *@version 2009 December 17
16346 *
16347 * @since Release 20101201
16348 *
16349 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
16350 */
16351 public static PrecessionNutation jauPn06(double date1, double date2, double dpsi, double deps)
16352 {
16353
16354 double rb[][] = new double[3][3], rbp[][] = new double[3][3], rbpn[][] = new double[3][3];
16355 /* Bias-precession Fukushima-Williams angles of J2000.0 = frame bias. */
16356 FWPrecessionAngles fw = jauPfw06(DJM0, DJM00);
16357
16358 /* B matrix. */
16359 double[][] r1 = jauFw2m(fw.gamb, fw.phib, fw.psib, fw.epsa);
16360 jauCr(r1, rb);
16361
16362 /* Bias-precession Fukushima-Williams angles of date. */
16363 fw = jauPfw06(date1, date2);
16364
16365 /* Bias-precession matrix. */
16366 double[][] r2 = jauFw2m(fw.gamb, fw.phib, fw.psib, fw.epsa );
16367 jauCr(r2, rbp);
16368
16369 /* Solve for precession matrix. */
16370 double[][] rt = jauTr(r1);
16371 double[][] rp = jauRxr(r2, rt);
16372
16373 /* Equinox-based bias-precession-nutation matrix. */
16374 r1 = jauFw2m(fw.gamb, fw.phib, fw.psib + dpsi, fw.epsa + deps);
16375 jauCr(r1, rbpn);
16376
16377 /* Solve for nutation matrix. */
16378 rt = jauTr(r2);
16379 double[][] rn = jauRxr(r1, rt);
16380
16381 /* Obliquity, mean of date. */
16382 double epsa = fw.epsa;
16383
16384 return new PrecessionNutation(dpsi, deps, epsa, rb, rp, rbp, rn, rbpn);
16385
16386 }
16387
16388
16389 /**
16390 * Precession-nutation, IAU 2006/2000A models: a multi-purpose function,
16391 * supporting classical (equinox-based) use directly and CIO-based use
16392 * indirectly.
16393 *
16394 *<p>This function is derived from the International Astronomical Union's
16395 * SOFA (Standards Of Fundamental Astronomy) software collection.
16396 *
16397 *<p>Status: support function.
16398 *
16399 *<!-- Given: -->
16400 * @param date1 double TT as a 2-part Julian Date (Note 1)
16401 * @param date2 double TT as a 2-part Julian Date (Note 1)
16402 *
16403 *<!-- Returned: -->
16404 * @return dpsi,deps double <u>returned</u> nutation (Note 2)
16405 * epsa double <u>returned</u> mean obliquity (Note 3)
16406 * rb double[3][3] <u>returned</u> frame bias matrix (Note 4)
16407 * rp double[3][3] <u>returned</u> precession matrix (Note 5)
16408 * rbp double[3][3] <u>returned</u> bias-precession matrix (Note 6)
16409 * rn double[3][3] <u>returned</u> nutation matrix (Note 7)
16410 * rbpn double[3][3] <u>returned</u> GCRS-to-true matrix (Notes 8,9)
16411 *
16412 * <p>Notes:
16413 * <ol>
16414 *
16415 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
16416 * convenient way between the two arguments. For example,
16417 * JD(TT)=2450123.7 could be expressed in any of these ways,
16418 * among others:
16419 *<pre>
16420 * date1 date2
16421 *
16422 * 2450123.7 0.0 (JD method)
16423 * 2451545.0 -1421.3 (J2000 method)
16424 * 2400000.5 50123.2 (MJD method)
16425 * 2450123.5 0.2 (date & time method)
16426 *</pre>
16427 * The JD method is the most natural and convenient to use in
16428 * cases where the loss of several decimal digits of resolution
16429 * is acceptable. The J2000 method is best matched to the way
16430 * the argument is handled internally and will deliver the
16431 * optimum resolution. The MJD method and the date & time methods
16432 * are both good compromises between resolution and convenience.
16433 *
16434 * <li> The nutation components (luni-solar + planetary, IAU 2000A) in
16435 * longitude and obliquity are in radians and with respect to the
16436 * equinox and ecliptic of date. Free core nutation is omitted;
16437 * for the utmost accuracy, use the jauPn06 function, where the
16438 * nutation components are caller-specified.
16439 *
16440 * <li> The mean obliquity is consistent with the IAU 2006 precession.
16441 *
16442 * <li> The matrix rb transforms vectors from GCRS to mean J2000.0 by
16443 * applying frame bias.
16444 *
16445 * <li> The matrix rp transforms vectors from mean J2000.0 to mean of
16446 * date by applying precession.
16447 *
16448 * <li> The matrix rbp transforms vectors from GCRS to mean of date by
16449 * applying frame bias then precession. It is the product rp x rb.
16450 *
16451 * <li> The matrix rn transforms vectors from mean of date to true of
16452 * date by applying the nutation (luni-solar + planetary).
16453 *
16454 * <li> The matrix rbpn transforms vectors from GCRS to true of date
16455 * (CIP/equinox). It is the product rn x rbp, applying frame bias,
16456 * precession and nutation in that order.
16457 *
16458 * <li> The X,Y,Z coordinates of the IAU 2006/2000A Celestial
16459 * Intermediate Pole are elements (1,1-3) of the matrix rbpn.
16460 *
16461 * <li> It is permissible to re-use the same array in the returned
16462 * arguments. The arrays are filled in the stated order.
16463 *</ol>
16464 *<p>Called:<ul>
16465 * <li>{@link #jauNut06a} nutation, IAU 2006/2000A
16466 * <li>{@link #jauPn06} bias/precession/nutation results, IAU 2006
16467 * </ul>
16468 *<p>Reference:
16469 *
16470 * <p>Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855
16471 *
16472 *@version 2009 December 18
16473 *
16474 * @since Release 20101201
16475 *
16476 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
16477 */
16478 public static PrecessionNutation jauPn06a(double date1, double date2)
16479 {
16480 /* Nutation. */
16481 NutationTerms nut = jauNut06a(date1, date2);
16482
16483 /* Remaining results. */
16484 return jauPn06(date1, date2, nut.dpsi, nut.deps);
16485
16486 }
16487
16488
16489 /**
16490 * Form the matrix of precession-nutation for a given date (including
16491 * frame bias), equinox-based, IAU 2000A model.
16492 *
16493 *<p>This function is derived from the International Astronomical Union's
16494 * SOFA (Standards Of Fundamental Astronomy) software collection.
16495 *
16496 *<p>Status: support function.
16497 *
16498 *<!-- Given: -->
16499 * @param date1 double TT as a 2-part Julian Date (Note 1)
16500 * @param date2 double TT as a 2-part Julian Date (Note 1)
16501 *
16502 *<!-- Returned: -->
16503 * @return rbpn double[3][3] <u>returned</u> classical NPB matrix (Note 2)
16504 *
16505 * <p>Notes:
16506 * <ol>
16507 *
16508 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
16509 * convenient way between the two arguments. For example,
16510 * JD(TT)=2450123.7 could be expressed in any of these ways,
16511 * among others:
16512 *<pre>
16513 * date1 date2
16514 *
16515 * 2450123.7 0.0 (JD method)
16516 * 2451545.0 -1421.3 (J2000 method)
16517 * 2400000.5 50123.2 (MJD method)
16518 * 2450123.5 0.2 (date & time method)
16519 *</pre>
16520 * The JD method is the most natural and convenient to use in
16521 * cases where the loss of several decimal digits of resolution
16522 * is acceptable. The J2000 method is best matched to the way
16523 * the argument is handled internally and will deliver the
16524 * optimum resolution. The MJD method and the date & time methods
16525 * are both good compromises between resolution and convenience.
16526 *
16527 * <li> The matrix operates in the sense V(date) = rbpn * V(GCRS), where
16528 * the p-vector V(date) is with respect to the true equatorial triad
16529 * of date date1+date2 and the p-vector V(GCRS) is with respect to
16530 * the Geocentric Celestial Reference System (IAU, 2000).
16531 *
16532 * <li> A faster, but slightly less accurate result (about 1 mas), can be
16533 * obtained by using instead the jauPnm00b function.
16534 *</ol>
16535 *<p>Called:<ul>
16536 * <li>{@link #jauPn00a} bias/precession/nutation, IAU 2000A
16537 * </ul>
16538 *<p>Reference:
16539 *
16540 * IAU: Trans. International Astronomical Union, Vol. XXIVB; Proc.
16541 * 24th General Assembly, Manchester, UK. Resolutions B1.3, B1.6.
16542 * (2000)
16543 *
16544 *@version 2009 December 21
16545 *
16546 * @since Release 20101201
16547 *
16548 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
16549 */
16550 public static double[][] jauPnm00a(double date1, double date2)
16551 {
16552
16553 /* Obtain the required matrix (discarding other results). */
16554 PrecessionNutation pn = jauPn00a(date1, date2);
16555 return pn.rbpn;
16556
16557 }
16558
16559
16560 /**
16561 * Form the matrix of precession-nutation for a given date (including
16562 * frame bias), equinox-based, IAU 2000B model.
16563 *
16564 *<p>This function is derived from the International Astronomical Union's
16565 * SOFA (Standards Of Fundamental Astronomy) software collection.
16566 *
16567 *<p>Status: support function.
16568 *
16569 *<!-- Given: -->
16570 * @param date1 double TT as a 2-part Julian Date (Note 1)
16571 * @param date2 double TT as a 2-part Julian Date (Note 1)
16572 *
16573 *<!-- Returned: -->
16574 * @return rbpn double[3][3] <u>returned</u> bias-precession-nutation matrix (Note 2)
16575 *
16576 * <p>Notes:
16577 * <ol>
16578 *
16579 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
16580 * convenient way between the two arguments. For example,
16581 * JD(TT)=2450123.7 could be expressed in any of these ways,
16582 * among others:
16583 *<pre>
16584 * date1 date2
16585 *
16586 * 2450123.7 0.0 (JD method)
16587 * 2451545.0 -1421.3 (J2000 method)
16588 * 2400000.5 50123.2 (MJD method)
16589 * 2450123.5 0.2 (date & time method)
16590 *</pre>
16591 * The JD method is the most natural and convenient to use in
16592 * cases where the loss of several decimal digits of resolution
16593 * is acceptable. The J2000 method is best matched to the way
16594 * the argument is handled internally and will deliver the
16595 * optimum resolution. The MJD method and the date & time methods
16596 * are both good compromises between resolution and convenience.
16597 *
16598 * <li> The matrix operates in the sense V(date) = rbpn * V(GCRS), where
16599 * the p-vector V(date) is with respect to the true equatorial triad
16600 * of date date1+date2 and the p-vector V(GCRS) is with respect to
16601 * the Geocentric Celestial Reference System (IAU, 2000).
16602 *
16603 * <li> The present function is faster, but slightly less accurate (about
16604 * 1 mas), than the jauPnm00a function.
16605 *</ol>
16606 *<p>Called:<ul>
16607 * <li>{@link #jauPn00b} bias/precession/nutation, IAU 2000B
16608 * </ul>
16609 *<p>Reference:
16610 *
16611 * IAU: Trans. International Astronomical Union, Vol. XXIVB; Proc.
16612 * 24th General Assembly, Manchester, UK. Resolutions B1.3, B1.6.
16613 * (2000)
16614 *
16615 *@version 2009 December 21
16616 *
16617 * @since Release 20101201
16618 *
16619 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
16620 */
16621 public static double[][] jauPnm00b(double date1, double date2)
16622 {
16623
16624 /* Obtain the required matrix (discarding other results). */
16625 PrecessionNutation pn = jauPn00b(date1, date2);
16626
16627 return pn.rbpn;
16628
16629 }
16630
16631
16632 /**
16633 * Form the matrix of precession-nutation for a given date (including
16634 * frame bias), IAU 2006 precession and IAU 2000A nutation models.
16635 *
16636 *<p>This function is derived from the International Astronomical Union's
16637 * SOFA (Standards Of Fundamental Astronomy) software collection.
16638 *
16639 *<p>Status: support function.
16640 *
16641 *<!-- Given: -->
16642 * @param date1 double TT as a 2-part Julian Date (Note 1)
16643 * @param date2 double TT as a 2-part Julian Date (Note 1)
16644 *
16645 *<!-- Returned: -->
16646 * @return rnpb double[3][3] <u>returned</u> bias-precession-nutation matrix (Note 2)
16647 *
16648 * <p>Notes:
16649 * <ol>
16650 *
16651 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
16652 * convenient way between the two arguments. For example,
16653 * JD(TT)=2450123.7 could be expressed in any of these ways,
16654 * among others:
16655 *<pre>
16656 * date1 date2
16657 *
16658 * 2450123.7 0.0 (JD method)
16659 * 2451545.0 -1421.3 (J2000 method)
16660 * 2400000.5 50123.2 (MJD method)
16661 * 2450123.5 0.2 (date & time method)
16662 *</pre>
16663 * The JD method is the most natural and convenient to use in
16664 * cases where the loss of several decimal digits of resolution
16665 * is acceptable. The J2000 method is best matched to the way
16666 * the argument is handled internally and will deliver the
16667 * optimum resolution. The MJD method and the date & time methods
16668 * are both good compromises between resolution and convenience.
16669 *
16670 * <li> The matrix operates in the sense V(date) = rnpb * V(GCRS), where
16671 * the p-vector V(date) is with respect to the true equatorial triad
16672 * of date date1+date2 and the p-vector V(GCRS) is with respect to
16673 * the Geocentric Celestial Reference System (IAU, 2000).
16674 *</ol>
16675 *<p>Called:<ul>
16676 * <li>{@link #jauPfw06} bias-precession F-W angles, IAU 2006
16677 * <li>{@link #jauNut06a} nutation, IAU 2006/2000A
16678 * <li>{@link #jauFw2m} F-W angles to r-matrix
16679 * </ul>
16680 *<p>Reference:
16681 *
16682 * <p>Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855.
16683 *
16684 *@version 2009 December 21
16685 *
16686 * @since Release 20101201
16687 *
16688 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
16689 */
16690 public static double[][] jauPnm06a(double date1, double date2)
16691 {
16692
16693 /* Fukushima-Williams angles for frame bias and precession. */
16694 FWPrecessionAngles fw = jauPfw06(date1, date2);
16695
16696 /* Nutation components. */
16697 NutationTerms nut = jauNut06a(date1, date2);
16698
16699 /* Equinox based nutation x precession x bias matrix. */
16700 double[][] rnpb = jauFw2m(fw.gamb, fw.phib, fw.psib + nut.dpsi, fw.epsa + nut.deps);
16701
16702 return rnpb;
16703
16704 }
16705
16706
16707 /**
16708 * Form the matrix of precession/nutation for a given date, IAU 1976
16709 * precession model, IAU 1980 nutation model.
16710 *
16711 *<p>This function is derived from the International Astronomical Union's
16712 * SOFA (Standards Of Fundamental Astronomy) software collection.
16713 *
16714 *<p>Status: support function.
16715 *
16716 *<!-- Given: -->
16717 * @param date1 double TDB date (Note 1)
16718 * @param date2 double TDB date (Note 1)
16719 *
16720 *<!-- Returned: -->
16721 * @return rmatpn double[3][3] <u>returned</u> combined precession/nutation matrix
16722 *
16723 * <p>Notes:
16724 * <ol>
16725 *
16726 * <li> The TDB date date1+date2 is a Julian Date, apportioned in any
16727 * convenient way between the two arguments. For example,
16728 * JD(TDB)=2450123.7 could be expressed in any of these ways,
16729 * among others:
16730 *<pre>
16731 * date1 date2
16732 *
16733 * 2450123.7 0.0 (JD method)
16734 * 2451545.0 -1421.3 (J2000 method)
16735 * 2400000.5 50123.2 (MJD method)
16736 * 2450123.5 0.2 (date & time method)
16737 *</pre>
16738 * The JD method is the most natural and convenient to use in
16739 * cases where the loss of several decimal digits of resolution
16740 * is acceptable. The J2000 method is best matched to the way
16741 * the argument is handled internally and will deliver the
16742 * optimum resolution. The MJD method and the date & time methods
16743 * are both good compromises between resolution and convenience.
16744 *
16745 * <li> The matrix operates in the sense V(date) = rmatpn * V(J2000),
16746 * where the p-vector V(date) is with respect to the true equatorial
16747 * triad of date date1+date2 and the p-vector V(J2000) is with
16748 * respect to the mean equatorial triad of epoch J2000.0.
16749 *</ol>
16750 *<p>Called:<ul>
16751 * <li>{@link #jauPmat76} precession matrix, IAU 1976
16752 * <li>{@link #jauNutm80} nutation matrix, IAU 1980
16753 * <li>{@link #jauRxr} product of two r-matrices
16754 * </ul>
16755 *<p>Reference:
16756 *
16757 * <p>Explanatory Supplement to the Astronomical Almanac,
16758 * P. Kenneth Seidelmann (ed), University Science Books (1992),
16759 * Section 3.3 (p145).
16760 *
16761 *@version 2010 January 23
16762 *
16763 * @since Release 20101201
16764 *
16765 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
16766 */
16767 public static double[][] jauPnm80(double date1, double date2)
16768 {
16769 double rmatp[][] = new double[3][3], rmatn[][] = new double[3][3];
16770
16771
16772 /* Precession matrix, J2000.0 to date. */
16773 rmatp = jauPmat76(date1, date2 );
16774
16775 /* Nutation matrix. */
16776 rmatn = jauNutm80(date1, date2);
16777
16778 /* Combine the matrices: PN = N x P. */
16779 double[][] rmatpn = jauRxr(rmatn, rmatp);
16780
16781 return rmatpn;
16782
16783 }
16784
16785
16786 /**
16787 * Form the matrix of polar motion for a given date, IAU 2000.
16788 *
16789 *<p>This function is derived from the International Astronomical Union's
16790 * SOFA (Standards Of Fundamental Astronomy) software collection.
16791 *
16792 *<p>Status: support function.
16793 *
16794 *<!-- Given: -->
16795 * @param xp double coordinates of the pole (radians, Note 1)
16796 * @param yp double coordinates of the pole (radians, Note 1)
16797 * @param sp double the TIO locator s' (radians, Note 2)
16798 *
16799 *<!-- Returned: -->
16800 * @return double[3][3] <u>returned</u> polar-motion matrix (Note 3)
16801 *
16802 * <p>Notes:
16803 * <ol>
16804 *
16805 * <li> The arguments xp and yp are the coordinates (in radians) of the
16806 * Celestial Intermediate Pole with respect to the International
16807 * Terrestrial Reference System (see IERS Conventions 2003),
16808 * measured along the meridians to 0 and 90 deg west respectively.
16809 *
16810 * <li> The argument sp is the TIO locator s', in radians, which
16811 * positions the Terrestrial Intermediate Origin on the equator. It
16812 * is obtained from polar motion observations by numerical
16813 * integration, and so is in essence unpredictable. However, it is
16814 * dominated by a secular drift of about 47 microarcseconds per
16815 * century, and so can be taken into account by using s' = -47*t,
16816 * where t is centuries since J2000.0. The function jauSp00
16817 * implements this approximation.
16818 *
16819 * <li> The matrix operates in the sense V(TRS) = rpom * V(CIP), meaning
16820 * that it is the final rotation when computing the pointing
16821 * direction to a celestial source.
16822 *</ol>
16823 *<p>Called:<ul>
16824 * <li>{@link #jauIr} initialize r-matrix to identity
16825 * <li>{@link #jauRz} rotate around Z-axis
16826 * <li>{@link #jauRy} rotate around Y-axis
16827 * <li>{@link #jauRx} rotate around X-axis
16828 * </ul>
16829 *<p>Reference:
16830 *
16831 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
16832 * IERS Technical Note No. 32, BKG (2004)
16833 *
16834 *@version 2009 December 17
16835 *
16836 * @since Release 20101201
16837 *
16838 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
16839 */
16840 public static double[][] jauPom00(double xp, double yp, double sp)
16841 {
16842
16843 /* Construct the matrix. */
16844 double rpom[][] = new double[3][3];
16845 jauIr(rpom);
16846 jauRz(sp, rpom);
16847 jauRy(-xp, rpom);
16848 jauRx(-yp, rpom);
16849
16850 return rpom;
16851
16852 }
16853
16854
16855 /**
16856 * P-vector addition.
16857 *
16858 *<p>This function is derived from the International Astronomical Union's
16859 * SOFA (Standards Of Fundamental Astronomy) software collection.
16860 *
16861 *<p>Status: vector/matrix support function.
16862 *
16863 *<!-- Given: -->
16864 * @param a double[3] first p-vector
16865 * @param b double[3] second p-vector
16866 *
16867 *<!-- Returned: -->
16868 * @return apb double[3] <u>returned</u> a + b
16869 *
16870 * Note:
16871 * It is permissible to re-use the same array for any of the
16872 * arguments.
16873 *
16874 *@version 2008 November 18
16875 *
16876 * @since Release 20101201
16877 *
16878 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
16879 */
16880 public static double[] jauPpp(double a[] , double b[] )
16881 {
16882 double apb[] = new double[3];
16883 apb[0] = a[0] + b[0];
16884 apb[1] = a[1] + b[1];
16885 apb[2] = a[2] + b[2];
16886
16887 return apb;
16888
16889 }
16890
16891
16892 /**
16893 * P-vector plus scaled p-vector.
16894 *
16895 *<p>This function is derived from the International Astronomical Union's
16896 * SOFA (Standards Of Fundamental Astronomy) software collection.
16897 *
16898 *<p>Status: vector/matrix support function.
16899 *
16900 *<!-- Given: -->
16901 * @param a double[3] first p-vector
16902 * @param s double scalar (multiplier for b)
16903 * @param b double[3] second p-vector
16904 *
16905 *<!-- Returned: -->
16906 * @return apsb double[3] <u>returned</u> a + s*b
16907 *
16908 * Note:
16909 * It is permissible for any of a, b and apsb to be the same array.
16910 *
16911 *<p>Called:<ul>
16912 * <li>{@link #jauSxp} multiply p-vector by scalar
16913 * <li>{@link #jauPpp} p-vector plus p-vector
16914 * </ul>
16915 *@version 2008 November 18
16916 *
16917 * @since Release 20101201
16918 *
16919 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
16920 */
16921 static double[] jauPpsp(double a[] , double s, double b[] )
16922 {
16923 double sb[] = new double[3], apsb[];
16924
16925
16926 /* s*b. */
16927 sb = jauSxp(s,b);
16928
16929 /* a + s*b. */
16930 apsb = jauPpp(a, sb);
16931
16932 return apsb;
16933
16934 }
16935
16936 /**
16937 * Precession correction terms.
16938 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
16939 *
16940 * @since AIDA Stage 1
16941 */
16942 public static class PrecessionDeltaTerms {
16943 /** precession correction in longitude */
16944 public double dpsipr;
16945 /** precession correction in obliquity */
16946 public double depspr;
16947 public PrecessionDeltaTerms(double dpsipr, double depspr) {
16948 this.dpsipr = dpsipr;
16949 this.depspr = depspr;
16950 }
16951 }
16952
16953 /**
16954 * Precession-rate part of the IAU 2000 precession-nutation models
16955 * (part of MHB2000).
16956 *
16957 *<p>This function is derived from the International Astronomical Union's
16958 * SOFA (Standards Of Fundamental Astronomy) software collection.
16959 *
16960 *<p>Status: canonical model.
16961 *
16962 *<!-- Given: -->
16963 * @param date1 double TT as a 2-part Julian Date (Note 1)
16964 * @param date2 double TT as a 2-part Julian Date (Note 1)
16965 *
16966 *<!-- Returned: -->
16967 * @param dpsipr double <u>returned</u> precession corrections (Notes 2,3)
16968 * @param depspr double <u>returned</u> precession corrections (Notes 2,3)
16969 *
16970 * <p>Notes:
16971 * <ol>
16972 *
16973 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
16974 * convenient way between the two arguments. For example,
16975 * JD(TT)=2450123.7 could be expressed in any of these ways,
16976 * among others:
16977 *<pre>
16978 * date1 date2
16979 *
16980 * 2450123.7 0.0 (JD method)
16981 * 2451545.0 -1421.3 (J2000 method)
16982 * 2400000.5 50123.2 (MJD method)
16983 * 2450123.5 0.2 (date & time method)
16984 *</pre>
16985 * The JD method is the most natural and convenient to use in
16986 * cases where the loss of several decimal digits of resolution
16987 * is acceptable. The J2000 method is best matched to the way
16988 * the argument is handled internally and will deliver the
16989 * optimum resolution. The MJD method and the date & time methods
16990 * are both good compromises between resolution and convenience.
16991 *
16992 * <li> The precession adjustments are expressed as "nutation
16993 * components", corrections in longitude and obliquity with respect
16994 * to the J2000.0 equinox and ecliptic.
16995 *
16996 * <li> Although the precession adjustments are stated to be with respect
16997 * to Lieske et al. (1977), the MHB2000 model does not specify which
16998 * set of Euler angles are to be used and how the adjustments are to
16999 * be applied. The most literal and straightforward procedure is to
17000 * adopt the 4-rotation epsilon_0, psi_A, omega_A, xi_A option, and
17001 * to add dpsipr to psi_A and depspr to both omega_A and eps_A.
17002 *
17003 * <li> This is an implementation of one aspect of the IAU 2000A nutation
17004 * model, formally adopted by the IAU General Assembly in 2000,
17005 * namely MHB2000 (Mathews et al. 2002).
17006 *
17007 *<p>References:
17008 *
17009 * <p>Lieske, J.H., Lederle, T., Fricke, W. & Morando, B., "Expressions
17010 * for the precession quantities based upon the IAU (1976) System of
17011 * Astronomical Constants", Astron.Astrophys., 58, 1-16 (1977)
17012 *
17013 * <p>Mathews, P.M., Herring, T.A., Buffet, B.A., "Modeling of nutation
17014 * and precession New nutation series for nonrigid Earth and
17015 * insights into the Earth's interior", J.Geophys.Res., 107, B4,
17016 * 2002. The MHB2000 code itself was obtained on 9th September 2002
17017 * from ftp://maia.usno.navy.mil/conv2000/chapter5/IAU2000A.
17018 *
17019 * <p>Wallace, P.T., "Software for Implementing the IAU 2000
17020 * Resolutions", in IERS Workshop 5.1 (2002).
17021 *
17022 *@version 2009 December 17
17023 *
17024 * @since Release 20101201
17025 *
17026 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17027 */
17028 static PrecessionDeltaTerms jauPr00(double date1, double date2)
17029 {
17030 double t;
17031
17032 /* Precession and obliquity corrections (radians per century) */
17033 final double PRECOR = -0.29965 * DAS2R,
17034 OBLCOR = -0.02524 * DAS2R;
17035
17036
17037 /* Interval between fundamental epoch J2000.0 and given date (JC). */
17038 t = ((date1 - DJ00) + date2) / DJC;
17039
17040 /* Precession rate contributions with respect to IAU 1976/80. */
17041 double dpsipr = PRECOR * t;
17042 double depspr = OBLCOR * t;
17043
17044 return new PrecessionDeltaTerms(dpsipr, depspr);
17045
17046 }
17047
17048 /**
17049 * Euler Angles.
17050 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
17051 *
17052 * @since AIDA Stage 1
17053 */
17054 public static class EulerAngles {
17055 /** 1st rotation: radians cw around z */
17056 public double zeta;
17057 /** 3rd rotation: radians cw around z */
17058 public double z;
17059 /** 2nd rotation: radians ccw around y */
17060 public double theta;
17061 public EulerAngles(double zeta, double z, double theta){
17062 this.zeta = zeta;
17063 this.z = z;
17064 this.theta = theta;
17065 }
17066 }
17067
17068 /**
17069 * IAU 1976 precession model.
17070 *
17071 * This function forms the three Euler angles which implement general
17072 * precession between two epochs, using the IAU 1976 model (as for
17073 * the FK5 catalog).
17074 *
17075 *<p>This function is derived from the International Astronomical Union's
17076 * SOFA (Standards Of Fundamental Astronomy) software collection.
17077 *
17078 *<p>Status: canonical model.
17079 *
17080 *<!-- Given: -->
17081 * @param ep01 double TDB starting epoch (Note 1)
17082 * @param ep02 double TDB starting epoch (Note 1)
17083 * @param ep11 double TDB ending epoch (Note 1)
17084 * @param ep12 double TDB ending epoch (Note 1)
17085 *
17086 *<!-- Returned: -->
17087 * @param zeta double <u>returned</u> 1st rotation: radians cw around z
17088 * @param z double <u>returned</u> 3rd rotation: radians cw around z
17089 * @param theta double <u>returned</u> 2nd rotation: radians ccw around y
17090 *
17091 * <p>Notes:
17092 * <ol>
17093 *
17094 * <li> The epochs ep01+ep02 and ep11+ep12 are Julian Dates, apportioned
17095 * in any convenient way between the arguments epn1 and epn2. For
17096 * example, JD(TDB)=2450123.7 could be expressed in any of these
17097 * ways, among others:
17098 *
17099 * epn1 epn2
17100 *
17101 * 2450123.7 0.0 (JD method)
17102 * 2451545.0 -1421.3 (J2000 method)
17103 * 2400000.5 50123.2 (MJD method)
17104 * 2450123.5 0.2 (date & time method)
17105 *</pre>
17106 * The JD method is the most natural and convenient to use in cases
17107 * where the loss of several decimal digits of resolution is
17108 * acceptable. The J2000 method is best matched to the way the
17109 * argument is handled internally and will deliver the optimum
17110 * optimum resolution. The MJD method and the date & time methods
17111 * are both good compromises between resolution and convenience.
17112 * The two epochs may be expressed using different methods, but at
17113 * the risk of losing some resolution.
17114 *
17115 * <li> The accumulated precession angles zeta, z, theta are expressed
17116 * through canonical polynomials which are valid only for a limited
17117 * time span. In addition, the IAU 1976 precession rate is known to
17118 * be imperfect. The absolute accuracy of the present formulation
17119 * is better than 0.1 arcsec from 1960AD to 2040AD, better than
17120 * 1 arcsec from 1640AD to 2360AD, and remains below 3 arcsec for
17121 * the whole of the period 500BC to 3000AD. The errors exceed
17122 * 10 arcsec outside the range 1200BC to 3900AD, exceed 100 arcsec
17123 * outside 4200BC to 5600AD and exceed 1000 arcsec outside 6800BC to
17124 * 8200AD.
17125 *
17126 * <li> The three angles are returned in the conventional order, which
17127 * is not the same as the order of the corresponding Euler
17128 * rotations. The precession matrix is
17129 * R_3(-z) x R_2(+theta) x R_3(-zeta).
17130 *
17131 *<p>Reference:
17132 *
17133 * <p>Lieske, J.H., 1979, Astron.Astrophys. 73, 282, equations
17134 * (6) & (7), p283.
17135 *
17136 *@version 2009 December 17
17137 *
17138 * @since Release 20101201
17139 *
17140 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17141 */
17142 static EulerAngles jauPrec76(double ep01, double ep02, double ep11, double ep12)
17143 {
17144 double t0, t, tas2r, w;
17145
17146
17147 /* Interval between fundamental epoch J2000.0 and start epoch (JC). */
17148 t0 = ((ep01 - DJ00) + ep02) / DJC;
17149
17150 /* Interval over which precession required (JC). */
17151 t = ((ep11 - ep01) + (ep12 - ep02)) / DJC;
17152
17153 /* Euler angles. */
17154 tas2r = t * DAS2R;
17155 w = 2306.2181 + (1.39656 - 0.000139 * t0) * t0;
17156
17157 double zeta = (w + ((0.30188 - 0.000344 * t0) + 0.017998 * t) * t) * tas2r;
17158
17159 double z = (w + ((1.09468 + 0.000066 * t0) + 0.018203 * t) * t) * tas2r;
17160
17161 double theta = ((2004.3109 + (-0.85330 - 0.000217 * t0) * t0)
17162 + ((-0.42665 - 0.000217 * t0) - 0.041833 * t) * t) * tas2r;
17163
17164 return new EulerAngles(zeta, z, theta);
17165
17166 }
17167
17168
17169 /**
17170 * Discard velocity component of a pv-vector.
17171 *
17172 *<p>This function is derived from the International Astronomical Union's
17173 * SOFA (Standards Of Fundamental Astronomy) software collection.
17174 *
17175 *<p>Status: vector/matrix support function.
17176 *
17177 *<!-- Given: -->
17178 * @param pv double[2][3] pv-vector
17179 *
17180 *<!-- Returned: -->
17181 * @return p double[3] <u>returned</u> p-vector
17182 *
17183 *<p>Called:<ul>
17184 * <li>{@link #jauCp} copy p-vector
17185 * </ul>
17186 *@version 2008 May 11
17187 *
17188 * @since Release 20101201
17189 *
17190 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17191 */
17192 public static double[] jauPv2p(double pv[][] )
17193 {
17194 double p[] = new double[3];
17195 jauCp(pv[0], p);
17196
17197 return p;
17198
17199 }
17200
17201
17202 /**
17203 * A position and velocity expressed in spherical polar coordinates.
17204 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
17205 *
17206 * @since AIDA Stage 1
17207 */
17208 public static class SphericalPositionVelocity {
17209 public SphericalPosition pos;
17210 public SphericalPosition vel;
17211 public SphericalPositionVelocity( double theta, double phi, double r,
17212 double td, double pd, double rd) {
17213 pos = new SphericalPosition(theta, phi, r);
17214 vel = new SphericalPosition(td,pd,rd);
17215 }
17216 }
17217 /**
17218 * Convert position/velocity from Cartesian to spherical coordinates.
17219 *
17220 *<p>This function is derived from the International Astronomical Union's
17221 * SOFA (Standards Of Fundamental Astronomy) software collection.
17222 *
17223 *<p>Status: vector/matrix support function.
17224 *
17225 *<!-- Given: -->
17226 * @param pv double[2][3] pv-vector
17227 *
17228 *<!-- Returned: -->
17229 * @return theta double <u>returned</u> longitude angle (radians)
17230 * phi double <u>returned</u> latitude angle (radians)
17231 * r double <u>returned</u> radial distance
17232 * td double <u>returned</u> rate of change of theta
17233 * pd double <u>returned</u> rate of change of phi
17234 * rd double <u>returned</u> rate of change of r
17235 *
17236 * <p>Notes:
17237 * <ol>
17238 *
17239 * <li> If the position part of pv is null, theta, phi, td and pd
17240 * are indeterminate. This is handled by extrapolating the
17241 * position through unit time by using the velocity part of
17242 * pv. This moves the origin without changing the direction
17243 * of the velocity component. If the position and velocity
17244 * components of pv are both null, zeroes are returned for all
17245 * six results.
17246 *
17247 * <li> If the position is a pole, theta, td and pd are indeterminate.
17248 * In such cases zeroes are returned for all three.
17249 *</ol>
17250 *@version 2008 October 28
17251 *
17252 * @since Release 20101201
17253 *
17254 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17255 */
17256 public static SphericalPositionVelocity jauPv2s(double pv[][])
17257 {
17258 double x, y, z, xd, yd, zd, rxy2, rxy, r2, rtrue, rw, xyp;
17259 double theta, phi, r, td, pd, rd;
17260
17261 /* Components of position/velocity vector. */
17262 x = pv[0][0];
17263 y = pv[0][1];
17264 z = pv[0][2];
17265 xd = pv[1][0];
17266 yd = pv[1][1];
17267 zd = pv[1][2];
17268
17269 /* Component of r in XY plane squared. */
17270 rxy2 = x*x + y*y;
17271
17272 /* Modulus squared. */
17273 r2 = rxy2 + z*z;
17274
17275 /* Modulus. */
17276 rtrue = sqrt(r2);
17277
17278 /* If null vector, move the origin along the direction of movement. */
17279 rw = rtrue;
17280 if (rtrue == 0.0) {
17281 x = xd;
17282 y = yd;
17283 z = zd;
17284 rxy2 = x*x + y*y;
17285 r2 = rxy2 + z*z;
17286 rw = sqrt(r2);
17287 }
17288
17289 /* Position and velocity in spherical coordinates. */
17290 rxy = sqrt(rxy2);
17291 xyp = x*xd + y*yd;
17292 if (rxy2 != 0.0) {
17293 theta = atan2(y, x);
17294 phi = atan2(z, rxy);
17295 td = (x*yd - y*xd) / rxy2;
17296 pd = (zd*rxy2 - z*xyp) / (r2*rxy);
17297 } else {
17298 theta = 0.0;
17299 phi = (z != 0.0) ? atan2(z, rxy) : 0.0;
17300 td = 0.0;
17301 pd = 0.0;
17302 }
17303 r = rtrue;
17304 rd = (rw != 0.0) ? (xyp + z*zd) / rw : 0.0;
17305
17306 return new SphericalPositionVelocity(theta, phi, r, td, pd, rd);
17307
17308 }
17309
17310
17311 /**
17312 * Inner (=scalar=dot) product of two pv-vectors.
17313 *
17314 *<p>This function is derived from the International Astronomical Union's
17315 * SOFA (Standards Of Fundamental Astronomy) software collection.
17316 *
17317 *<p>Status: vector/matrix support function.
17318 *
17319 *<!-- Given: -->
17320 * @param a double[2][3] first pv-vector
17321 * @param b double[2][3] second pv-vector
17322 *
17323 *<!-- Returned: -->
17324 * @return adb double[2] <u>returned</u> a . b (see note)
17325 *
17326 * Note:
17327 *
17328 * If the position and velocity components of the two pv-vectors are
17329 * ( ap, av ) and ( bp, bv ), the result, a . b, is the pair of
17330 * numbers ( ap . bp , ap . bv + av . bp ). The two numbers are the
17331 * dot-product of the two p-vectors and its derivative.
17332 *
17333 *<p>Called:<ul>
17334 * <li>{@link #jauPdp} scalar product of two p-vectors
17335 * </ul>
17336 *@version 2008 May 22
17337 *
17338 * @since Release 20101201
17339 *
17340 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17341 */
17342 public static double[] jauPvdpv(double a[][], double b[][] )
17343 {
17344 double adbd, addb, adb[] = new double[2];
17345
17346
17347 /* a . b = constant part of result. */
17348 adb[0] = jauPdp(a[0], b[0]);
17349
17350 /* a . bdot */
17351 adbd = jauPdp(a[0], b[1]);
17352
17353 /* adot . b */
17354 addb = jauPdp(a[1], b[0]);
17355
17356 /* Velocity part of result. */
17357 adb[1] = adbd + addb;
17358
17359 return adb;
17360
17361 }
17362
17363
17364 /**
17365 * Modulus of pv-vector.
17366 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
17367 *
17368 * @since AIDA Stage 1
17369 */
17370 public static class PVModulus{
17371 public double r;
17372 public double s;
17373 public PVModulus( double r, double s){
17374 this.r = r;
17375 this.s = s;
17376 }
17377 }
17378 /**
17379 * Modulus of pv-vector.
17380 *
17381 *<p>This function is derived from the International Astronomical Union's
17382 * SOFA (Standards Of Fundamental Astronomy) software collection.
17383 *
17384 *<p>Status: vector/matrix support function.
17385 *
17386 *<!-- Given: -->
17387 * @param pv double[2][3] pv-vector
17388 *
17389 *<!-- Returned: -->
17390 * @return modulus of position component,
17391 * modulus of velocity component
17392 *
17393 *<p>Called:<ul>
17394 * <li>{@link #jauPm} modulus of p-vector
17395 * </ul>
17396 *@version 2008 May 22
17397 *
17398 * @since Release 20101201
17399 *
17400 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17401 */
17402 public static PVModulus jauPvm(double pv[][])
17403 {
17404 /* Distance. */
17405 double r = jauPm(pv[0]);
17406
17407 /* Speed. */
17408 double s = jauPm(pv[1]);
17409
17410 return new PVModulus(r, s);
17411
17412 }
17413
17414
17415 /**
17416 * Subtract one pv-vector from another.
17417 *
17418 *<p>This function is derived from the International Astronomical Union's
17419 * SOFA (Standards Of Fundamental Astronomy) software collection.
17420 *
17421 *<p>Status: vector/matrix support function.
17422 *
17423 *<!-- Given: -->
17424 * @param a double[2][3] first pv-vector
17425 * @param b double[2][3] second pv-vector
17426 *
17427 *<!-- Returned: -->
17428 * @return double[2][3] <u>returned</u> a - b
17429 *
17430 * Note:
17431 * It is permissible to re-use the same array for any of the
17432 * arguments.
17433 *
17434 *<p>Called:<ul>
17435 * <li>{@link #jauPmp} p-vector minus p-vector
17436 * </ul>
17437 *@version 2008 November 18
17438 *
17439 * @since Release 20101201
17440 *
17441 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17442 */
17443 public static double[][] jauPvmpv(double a[][], double b[][])
17444 {
17445 double amb[][] = new double[2][3];
17446 amb[0] = jauPmp(a[0], b[0]);
17447 amb[1] = jauPmp(a[1], b[1]);
17448
17449 return amb;
17450
17451 }
17452
17453
17454 /**
17455 * Add one pv-vector to another.
17456 *
17457 *<p>This function is derived from the International Astronomical Union's
17458 * SOFA (Standards Of Fundamental Astronomy) software collection.
17459 *
17460 *<p>Status: vector/matrix support function.
17461 *
17462 *<!-- Given: -->
17463 * @param a double[2][3] first pv-vector
17464 * @param b double[2][3] second pv-vector
17465 *
17466 *<!-- Returned: -->
17467 * @return apb double[2][3] <u>returned</u> a + b
17468 *
17469 * Note:
17470 * It is permissible to re-use the same array for any of the
17471 * arguments.
17472 *
17473 *<p>Called:<ul>
17474 * <li>{@link #jauPpp} p-vector plus p-vector
17475 * </ul>
17476 *@version 2008 November 18
17477 *
17478 * @since Release 20101201
17479 *
17480 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17481 */
17482 public static double[][] jauPvppv(double a[][], double b[][])
17483 {
17484 double apb[][] = new double[2][3];
17485 apb[0] = jauPpp(a[0], b[0]);
17486 apb[1] = jauPpp(a[1], b[1]);
17487
17488 return apb;
17489
17490 }
17491
17492
17493 /**
17494 * Typical catalogue coordinates. i.e. Position, proper motion, parallax and radial velocity.
17495 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
17496 *
17497 * @since AIDA Stage 1
17498 */
17499 public static class CatalogCoords {
17500 /** position (radians) */
17501 public SphericalCoordinate pos;
17502 /** proper motion (radians/year)*/
17503 public SphericalCoordinate pm;
17504 /** parallax (arcsec) */
17505 public double px;
17506 /** radial velocity (km/s, positive = receding) */
17507 public double rv;
17508
17509 public CatalogCoords(double ra, double dec,
17510 double pmr, double pmd, double px, double rv) {
17511 this.pos = new SphericalCoordinate(ra, dec);
17512 this.pm = new SphericalCoordinate(pmr, pmd);
17513 this.px = px;
17514 this.rv = rv;
17515 }
17516 }
17517 /**
17518 * Convert star position+velocity vector to catalog coordinates.
17519 *
17520 *<p>This function is derived from the International Astronomical Union's
17521 * SOFA (Standards Of Fundamental Astronomy) software collection.
17522 *
17523 *<p>Status: support function.
17524 *
17525 * Given (Note 1):
17526 * @param pv double[2][3] pv-vector (au, au/day)
17527 *
17528 *
17529 * <!-- Returned (function value): -->
17530 * @return catalogue value
17531 *
17532 * int status:
17533 * 0 = OK
17534 * -1 = superluminal speed (Note 5)
17535 * -2 = null position vector
17536 *
17537 * <p>Notes:
17538 * <ol>
17539 *
17540 * <li> The specified pv-vector is the coordinate direction (and its rate
17541 * of change) for the date at which the light leaving the star
17542 * reached the solar-system barycenter.
17543 *
17544 * <li> The star data returned by this function are "observables" for an
17545 * imaginary observer at the solar-system barycenter. Proper motion
17546 * and radial velocity are, strictly, in terms of barycentric
17547 * coordinate time, TCB. For most practical applications, it is
17548 * permissible to neglect the distinction between TCB and ordinary
17549 * "proper" time on Earth (TT/TAI). The result will, as a rule, be
17550 * limited by the intrinsic accuracy of the proper-motion and
17551 * radial-velocity data; moreover, the supplied pv-vector is likely
17552 * to be merely an intermediate result (for example generated by the
17553 * function jauStarpv), so that a change of time unit will cancel
17554 * out overall.
17555 *
17556 * In accordance with normal star-catalog conventions, the object's
17557 * right ascension and declination are freed from the effects of
17558 * secular aberration. The frame, which is aligned to the catalog
17559 * equator and equinox, is Lorentzian and centered on the SSB.
17560 *
17561 * Summarizing, the specified pv-vector is for most stars almost
17562 * identical to the result of applying the standard geometrical
17563 * "space motion" transformation to the catalog data. The
17564 * differences, which are the subject of the Stumpff paper cited
17565 * below, are:
17566 *
17567 * (i) In stars with significant radial velocity and proper motion,
17568 * the constantly changing light-time distorts the apparent proper
17569 * motion. Note that this is a classical, not a relativistic,
17570 * effect.
17571 *
17572 * (ii) The transformation complies with special relativity.
17573 *
17574 * <li> Care is needed with units. The star coordinates are in radians
17575 * and the proper motions in radians per Julian year, but the
17576 * parallax is in arcseconds; the radial velocity is in km/s, but
17577 * the pv-vector result is in au and au/day.
17578 *
17579 * <li> The proper motions are the rate of change of the right ascension
17580 * and declination at the catalog epoch and are in radians per Julian
17581 * year. The RA proper motion is in terms of coordinate angle, not
17582 * true angle, and will thus be numerically larger at high
17583 * declinations.
17584 *
17585 * <li> Straight-line motion at constant speed in the inertial frame is
17586 * assumed. If the speed is greater than or equal to the speed of
17587 * light, the function aborts with an error status.
17588 *
17589 * <li> The inverse transformation is performed by the function jauStarpv.
17590 *</ol>
17591 *<p>Called:<ul>
17592 * <li>{@link #jauPn} decompose p-vector into modulus and direction
17593 * <li>{@link #jauPdp} scalar product of two p-vectors
17594 * <li>{@link #jauSxp} multiply p-vector by scalar
17595 * <li>{@link #jauPmp} p-vector minus p-vector
17596 * <li>{@link #jauPm} modulus of p-vector
17597 * <li>{@link #jauPpp} p-vector plus p-vector
17598 * <li>{@link #jauPv2s} pv-vector to spherical
17599 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
17600 * </ul>
17601 *<p>Reference:
17602 *
17603 * Stumpff, P., 1985, Astron.Astrophys. 144, 232-240.
17604 *
17605 *@version 2017 May 30
17606 *
17607 * @since Release 20101201
17608 *
17609 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17610 */
17611 public static CatalogCoords jauPvstar(double pv[][]) throws JSOFAInternalError
17612 {
17613 double x[] = new double[3], vr, ur[] = new double[3], vt, ut[] = new double[3], bett, betr, d, w, del,
17614 usr[] = new double[3], ust[] = new double[3];
17615
17616
17617 /* Isolate the radial component of the velocity (au/day, inertial). */
17618 NormalizedVector nv = jauPn(pv[0]);
17619 x = nv.u;
17620 vr = jauPdp(x, pv[1]);
17621 ur = jauSxp(vr,x);
17622
17623 /* Isolate the transverse component of the velocity (au/day, inertial). */
17624 ut = jauPmp(pv[1], ur);
17625 vt = jauPm(ut);
17626
17627 /* Special-relativity dimensionless parameters. */
17628 bett = vt / DC;
17629 betr = vr / DC;
17630
17631 /* The inertial-to-observed correction terms. */
17632 d = 1.0 + betr;
17633 w = betr*betr + bett*bett;
17634 if (d == 0.0 || w > 1) throw new JSOFAInternalError("Superluminal speed", -1);
17635 del = -w / (sqrt(1.0 -w) + 1.0);
17636
17637 /* Apply relativistic correction factor to radial velocity component. */
17638 w = (betr != 0) ? (betr - del) / (betr * d) : 1.0;
17639 usr = jauSxp(w,ur);
17640
17641 /* Apply relativistic correction factor to tangential velocity */
17642 /* component. */
17643 ust = jauSxp(1.0/d, ut);
17644
17645 /* Combine the two to obtain the observed velocity vector (au/day). */
17646 pv[1] = jauPpp(usr, ust);
17647
17648 /* Cartesian to spherical. */
17649 SphericalPositionVelocity pvs = jauPv2s(pv);
17650 if (pvs.pos.r == 0.0) throw new JSOFAInternalError("null position vector", -2);
17651
17652 /* Return RA in range 0 to 2pi. */
17653 double ra = jauAnp(pvs.pos.theta);
17654
17655 /* Return proper motions in radians per year. */
17656 double pmr = pvs.vel.theta * DJY;
17657 double pmd = pvs.vel.phi * DJY;
17658
17659 /* Return parallax in arcsec. */
17660 double px = DR2AS / pvs.pos.r;
17661
17662 /* Return radial velocity in km/s. */
17663 double rv = 1e-3 * pvs.vel.r * DAU / DAYSEC;
17664
17665 /* OK status. */
17666 return new CatalogCoords(ra, pvs.pos.phi, pmr, pmd, px, rv);
17667
17668 }
17669
17670
17671 /**
17672 * Update a pv-vector.
17673 *
17674 *<p>This function is derived from the International Astronomical Union's
17675 * SOFA (Standards Of Fundamental Astronomy) software collection.
17676 *
17677 *<p>Status: vector/matrix support function.
17678 *
17679 *<!-- Given: -->
17680 * @param dt double time interval
17681 * @param pv double[2][3] pv-vector
17682 *
17683 *<!-- Returned: -->
17684 * @return upv double[2][3] <u>returned</u> p updated, v unchanged
17685 *
17686 * <p>Notes:
17687 * <ol>
17688 *
17689 * <li> "Update" means "refer the position component of the vector
17690 * to a new date dt time units from the existing date".
17691 *
17692 * <li> The time units of dt must match those of the velocity.
17693 *
17694 * <li> It is permissible for pv and upv to be the same array.
17695 *</ol>
17696 *<p>Called:<ul>
17697 * <li>{@link #jauPpsp} p-vector plus scaled p-vector
17698 * <li>{@link #jauCp} copy p-vector
17699 * </ul>
17700 *@version 2008 November 17
17701 *
17702 * @since Release 20101201
17703 *
17704 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17705 */
17706 public static double[][] jauPvu(double dt, double pv[][] )
17707 {
17708 double upv[][] = new double[2][3];
17709 upv[0] = jauPpsp(pv[0], dt, pv[1]);
17710 jauCp(pv[1], upv[1]);
17711
17712 return upv;
17713
17714 }
17715
17716
17717 /**
17718 * Update a pv-vector, discarding the velocity component.
17719 *
17720 *<p>This function is derived from the International Astronomical Union's
17721 * SOFA (Standards Of Fundamental Astronomy) software collection.
17722 *
17723 *<p>Status: vector/matrix support function.
17724 *
17725 *<!-- Given: -->
17726 * @param dt double time interval
17727 * @param pv double[2][3] pv-vector
17728 *
17729 *<!-- Returned: -->
17730 * @return p double[3] <u>returned</u> p-vector
17731 *
17732 * <p>Notes:
17733 * <ol>
17734 *
17735 * <li> "Update" means "refer the position component of the vector to a
17736 * new date dt time units from the existing date".
17737 *
17738 * <li> The time units of dt must match those of the velocity.
17739 *</ol>
17740 *@version 2008 May 11
17741 *
17742 * @since Release 20101201
17743 *
17744 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17745 */
17746 public static double[] jauPvup(double dt, double pv[][] )
17747 {
17748 double p[] = new double[3];
17749 p[0] = pv[0][0] + dt * pv[1][0];
17750 p[1] = pv[0][1] + dt * pv[1][1];
17751 p[2] = pv[0][2] + dt * pv[1][2];
17752
17753 return p;
17754
17755 }
17756
17757
17758 /**
17759 * Outer (=vector=cross) product of two pv-vectors.
17760 *
17761 *<p>This function is derived from the International Astronomical Union's
17762 * SOFA (Standards Of Fundamental Astronomy) software collection.
17763 *
17764 *<p>Status: vector/matrix support function.
17765 *
17766 *<!-- Given: -->
17767 * @param a double[2][3] first pv-vector
17768 * @param b double[2][3] second pv-vector
17769 *
17770 *<!-- Returned: -->
17771 * @return axb double[2][3] <u>returned</u> a x b
17772 *
17773 * <p>Notes:
17774 * <ol>
17775 *
17776 * <li> If the position and velocity components of the two pv-vectors are
17777 * ( ap, av ) and ( bp, bv ), the result, a x b, is the pair of
17778 * vectors ( ap x bp, ap x bv + av x bp ). The two vectors are the
17779 * cross-product of the two p-vectors and its derivative.
17780 *
17781 * <li> It is permissible to re-use the same array for any of the
17782 * arguments.
17783 *</ol>
17784 *<p>Called:<ul>
17785 * <li>{@link #jauCpv} copy pv-vector
17786 * <li>{@link #jauPxp} vector product of two p-vectors
17787 * <li>{@link #jauPpp} p-vector plus p-vector
17788 * </ul>
17789 *@version 2008 November 18
17790 *
17791 * @since Release 20101201
17792 *
17793 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17794 */
17795 public static double[][] jauPvxpv(double a[][], double b[][] )
17796 {
17797 double wa[][] = new double[2][3], wb[][] = new double[2][3], axbd[] = new double[3], adxb[] = new double[3];
17798
17799 double axb[][] = new double[2][3];
17800 /* Make copies of the inputs. */
17801 jauCpv(a, wa);
17802 jauCpv(b, wb);
17803
17804 /* a x b = position part of result. */
17805 axb[0] = jauPxp(wa[0], wb[0]);
17806
17807 /* a x bdot + adot x b = velocity part of result. */
17808 axbd = jauPxp(wa[0],wb[1]);
17809 adxb = jauPxp(wa[1],wb[0]);
17810 axb[1] = jauPpp(axbd, adxb);
17811
17812 return axb;
17813
17814 }
17815
17816
17817 /**
17818 * p-vector outer (=vector=cross) product.
17819 *
17820 *<p>This function is derived from the International Astronomical Union's
17821 * SOFA (Standards Of Fundamental Astronomy) software collection.
17822 *
17823 *<p>Status: vector/matrix support function.
17824 *
17825 *<!-- Given: -->
17826 * @param a double[3] first p-vector
17827 * @param b double[3] second p-vector
17828 *
17829 *<!-- Returned: -->
17830 * @return axb double[3] <u>returned</u> a x b
17831 *
17832 * Note:
17833 * It is permissible to re-use the same array for any of the
17834 * arguments.
17835 *
17836 *@version 2008 November 18
17837 *
17838 * @since Release 20101201
17839 *
17840 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17841 */
17842 public static double[] jauPxp(double a[] , double b[] )
17843 {
17844 double xa, ya, za, xb, yb, zb;
17845 double axb[] = new double[3];
17846
17847 xa = a[0];
17848 ya = a[1];
17849 za = a[2];
17850 xb = b[0];
17851 yb = b[1];
17852 zb = b[2];
17853 axb[0] = ya*zb - za*yb;
17854 axb[1] = za*xb - xa*zb;
17855 axb[2] = xa*yb - ya*xb;
17856
17857 return axb;
17858
17859 }
17860
17861
17862 /**
17863 * Express an r-matrix as an r-vector.
17864 *
17865 *<p>This function is derived from the International Astronomical Union's
17866 * SOFA (Standards Of Fundamental Astronomy) software collection.
17867 *
17868 *<p>Status: vector/matrix support function.
17869 *
17870 *<!-- Given: -->
17871 * @param r double[3][3] rotation matrix
17872 *
17873 *<!-- Returned: -->
17874 * @return w double[3] <u>returned</u> rotation vector (Note 1)
17875 *
17876 * <p>Notes:
17877 * <ol>
17878 *
17879 * <li> A rotation matrix describes a rotation through some angle about
17880 * some arbitrary axis called the Euler axis. The "rotation vector"
17881 * returned by this function has the same direction as the Euler axis,
17882 * and its magnitude is the angle in radians. (The magnitude and
17883 * direction can be separated by means of the function jauPn.)
17884 *
17885 * <li> If r is null, so is the result. If r is not a rotation matrix
17886 * the result is undefined; r must be proper (i.e. have a positive
17887 * determinant) and real orthogonal (inverse = transpose).
17888 *
17889 * <li> The reference frame rotates clockwise as seen looking along
17890 * the rotation vector from the origin.
17891 *</ol>
17892 *@version 2008 May 12
17893 *
17894 * @since Release 20101201
17895 *
17896 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17897 */
17898 public static double[] jauRm2v(double r[][] )
17899 {
17900 double x, y, z, s2, c2, phi, f;
17901 double w[] = new double[3];
17902
17903 x = r[1][2] - r[2][1];
17904 y = r[2][0] - r[0][2];
17905 z = r[0][1] - r[1][0];
17906 s2 = sqrt(x*x + y*y + z*z);
17907 if (s2 > 0) {
17908 c2 = r[0][0] + r[1][1] + r[2][2] - 1;
17909 phi = atan2(s2, c2);
17910 f = phi / s2;
17911 w[0] = x * f;
17912 w[1] = y * f;
17913 w[2] = z * f;
17914 } else {
17915 w[0] = 0.0;
17916 w[1] = 0.0;
17917 w[2] = 0.0;
17918 }
17919
17920 return w;
17921
17922 }
17923
17924
17925 /**
17926 * Form the r-matrix corresponding to a given r-vector.
17927 *
17928 *<p>This function is derived from the International Astronomical Union's
17929 * SOFA (Standards Of Fundamental Astronomy) software collection.
17930 *
17931 *<p>Status: vector/matrix support function.
17932 *
17933 *<!-- Given: -->
17934 * @param w double[3] rotation vector (Note 1)
17935 *
17936 *<!-- Returned: -->
17937 * @return r double[3][3] <u>returned</u> rotation matrix
17938 *
17939 * <p>Notes:
17940 * <ol>
17941 *
17942 * <li> A rotation matrix describes a rotation through some angle about
17943 * some arbitrary axis called the Euler axis. The "rotation vector"
17944 * supplied to This function has the same direction as the Euler
17945 * axis, and its magnitude is the angle in radians.
17946 *
17947 * <li> If w is null, the unit matrix is returned.
17948 *
17949 * <li> The reference frame rotates clockwise as seen looking along the
17950 * rotation vector from the origin.
17951 *</ol>
17952 *@version 2008 May 11
17953 *
17954 * @since Release 20101201
17955 *
17956 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17957 */
17958 public static double[][] jauRv2m(double w[])
17959 {
17960 double x, y, z, phi, s, c, f;
17961 double r[][] = new double[3][3];
17962
17963
17964 /* Euler angle (magnitude of rotation vector) and functions. */
17965 x = w[0];
17966 y = w[1];
17967 z = w[2];
17968 phi = sqrt(x*x + y*y + z*z);
17969 s = sin(phi);
17970 c = cos(phi);
17971 f = 1.0 - c;
17972
17973 /* Euler axis (direction of rotation vector), perhaps null. */
17974 if (phi > 0.0) {
17975 x /= phi;
17976 y /= phi;
17977 z /= phi;
17978 }
17979
17980 /* Form the rotation matrix. */
17981 r[0][0] = x*x*f + c;
17982 r[0][1] = x*y*f + z*s;
17983 r[0][2] = x*z*f - y*s;
17984 r[1][0] = y*x*f - z*s;
17985 r[1][1] = y*y*f + c;
17986 r[1][2] = y*z*f + x*s;
17987 r[2][0] = z*x*f + y*s;
17988 r[2][1] = z*y*f - x*s;
17989 r[2][2] = z*z*f + c;
17990
17991 return r;
17992
17993 }
17994
17995
17996 /**
17997 * Rotate an r-matrix about the x-axis.
17998 *
17999 *<p>This function is derived from the International Astronomical Union's
18000 * SOFA (Standards Of Fundamental Astronomy) software collection.
18001 *
18002 *<p>Status: vector/matrix support function.
18003 *
18004 *<!-- Given: -->
18005 * @param phi double angle (radians)
18006 *
18007 * Given and returned:
18008 * @param r double[3][3] r-matrix <u>given and returned</u>
18009 *
18010 * Sign convention: The matrix can be used to rotate the reference
18011 * frame of a vector. Calling this function with positive phi
18012 * incorporates in the matrix an additional rotation, about the x-axis,
18013 * anticlockwise as seen looking towards the origin from positive x.
18014 *
18015 *<p>Called:<ul>
18016 * <li>{@link #jauIr} initialize r-matrix to identity
18017 * <li>{@link #jauRxr} product of two r-matrices
18018 * <li>{@link #jauCr} copy r-matrix
18019 * </ul>
18020 *@version 2008 May 22
18021 *
18022 * @since Release 20101201
18023 *
18024 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
18025 */
18026 public static void jauRx(double phi, double r[][])
18027 {
18028 double s, c, a[][] = new double[3][3], w[][];
18029
18030
18031 /* Matrix representing new rotation. */
18032 s = sin(phi);
18033 c = cos(phi);
18034 jauIr(a);
18035 a[1][1] = c;
18036 a[2][1] = -s;
18037 a[1][2] = s;
18038 a[2][2] = c;
18039
18040 /* Rotate. */
18041 w = jauRxr(a, r);
18042
18043 /* Return result. */
18044 jauCr(w, r);
18045
18046 return;
18047
18048 }
18049
18050
18051 /**
18052 * Multiply a p-vector by an r-matrix.
18053 *
18054 *<p>This function is derived from the International Astronomical Union's
18055 * SOFA (Standards Of Fundamental Astronomy) software collection.
18056 *
18057 *<p>Status: vector/matrix support function.
18058 *
18059 *<!-- Given: -->
18060 * @param r double[3][3] r-matrix
18061 * @param p double[3] p-vector
18062 *
18063 *<!-- Returned: -->
18064 * @return rp double[3] <u>returned</u> r * p
18065 *
18066 * Note:
18067 * It is permissible for p and rp to be the same array.
18068 *
18069 *<p>Called:<ul>
18070 * <li>{@link #jauCp} copy p-vector
18071 * </ul>
18072 *@version 2008 October 28
18073 *
18074 * @since Release 20101201
18075 *
18076 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
18077 */
18078 public static double[] jauRxp(double r[][], double p[])
18079 {
18080 double w, wrp[] = new double[3] ;
18081 int i, j;
18082
18083
18084 /* Matrix r * vector p. */
18085 for (j = 0; j < 3; j++) {
18086 w = 0.0;
18087 for (i = 0; i < 3; i++) {
18088 w += r[j][i] * p[i];
18089 }
18090 wrp[j] = w;
18091 }
18092
18093
18094 return wrp;
18095
18096 }
18097
18098
18099 /**
18100 * Multiply a pv-vector by an r-matrix.
18101 *
18102 *<p>This function is derived from the International Astronomical Union's
18103 * SOFA (Standards Of Fundamental Astronomy) software collection.
18104 *
18105 *<p>Status: vector/matrix support function.
18106 *
18107 *<!-- Given: -->
18108 * @param r double[3][3] r-matrix
18109 * @param pv double[2][3] pv-vector
18110 *
18111 *<!-- Returned: -->
18112 * @return rpv double[2][3] <u>returned</u> r * pv
18113 *
18114 * Note:
18115 * It is permissible for pv and rpv to be the same array.
18116 *
18117 *<p>Called:<ul>
18118 * <li>{@link #jauRxp} product of r-matrix and p-vector
18119 * </ul>
18120 *@version 2008 October 28
18121 *
18122 * @since Release 20101201
18123 *
18124 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
18125 */
18126 public static double[][] jauRxpv(double r[][], double pv[][])
18127 {
18128 double rpv[][] = new double[2][0];
18129 rpv[0] = jauRxp(r, pv[0]);
18130 rpv[1] = jauRxp(r, pv[1]);
18131
18132 return rpv;
18133
18134 }
18135
18136
18137 /**
18138 * Multiply two r-matrices.
18139 *
18140 *<p>This function is derived from the International Astronomical Union's
18141 * SOFA (Standards Of Fundamental Astronomy) software collection.
18142 *
18143 *<p>Status: vector/matrix support function.
18144 *
18145 *<!-- Given: -->
18146 * @param a double[3][3] first r-matrix
18147 * @param b double[3][3] second r-matrix
18148 *
18149 *<!-- Returned: -->
18150 * @return atb double[3][3] <u>returned</u> a * b
18151 *
18152 * Note:
18153 * It is permissible to re-use the same array for any of the
18154 * arguments.
18155 *
18156 *<p>Called:<ul>
18157 * <li>{@link #jauCr} copy r-matrix
18158 * </ul>
18159 *@version 2008 November 18
18160 *
18161 * @since Release 20101201
18162 *
18163 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
18164 */
18165 public static double[][] jauRxr(double a[][], double b[][])
18166 {
18167 int i, j, k;
18168 double w, wm[][] = new double[3][3];
18169
18170
18171 for (i = 0; i < 3; i++) {
18172 for (j = 0; j < 3; j++) {
18173 w = 0.0;
18174 for (k = 0; k < 3; k++) {
18175 w += a[i][k] * b[k][j];
18176 }
18177 wm[i][j] = w;
18178 }
18179 }
18180
18181 return wm;
18182
18183 }
18184
18185
18186 /**
18187 * Rotate an r-matrix about the y-axis.
18188 *
18189 *<p>This function is derived from the International Astronomical Union's
18190 * SOFA (Standards Of Fundamental Astronomy) software collection.
18191 *
18192 *<p>Status: vector/matrix support function.
18193 *
18194 *<!-- Given: -->
18195 * @param theta double angle (radians)
18196 *
18197 * Given and returned:
18198 * @param r double[3][3] <u>given & returned</u> r-matrix
18199 *
18200 * Sign convention: The matrix can be used to rotate the reference
18201 * frame of a vector. Calling This function with positive theta
18202 * incorporates in the matrix an additional rotation, about the y-axis,
18203 * anticlockwise as seen looking towards the origin from positive y.
18204 *
18205 *<p>Called:<ul>
18206 * <li>{@link #jauIr} initialize r-matrix to identity
18207 * <li>{@link #jauRxr} product of two r-matrices
18208 * <li>{@link #jauCr} copy r-matrix
18209 * </ul>
18210 *@version 2008 May 22
18211 *
18212 * @since Release 20101201
18213 *
18214 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
18215 */
18216 public static void jauRy(double theta, double r[][])
18217 {
18218 double s, c, a[][] = new double[3][3], w[][];
18219
18220
18221 /* Matrix representing new rotation. */
18222 s = sin(theta);
18223 c = cos(theta);
18224 jauIr(a);
18225 a[0][0] = c;
18226 a[2][0] = s;
18227 a[0][2] = -s;
18228 a[2][2] = c;
18229
18230 /* Rotate. */
18231 w = jauRxr(a, r);
18232
18233 /* Return result. */
18234 jauCr(w, r);
18235
18236 return;
18237
18238 }
18239
18240
18241 /**
18242 * Rotate an r-matrix about the z-axis.
18243 *
18244 *<p>This function is derived from the International Astronomical Union's
18245 * SOFA (Standards Of Fundamental Astronomy) software collection.
18246 *
18247 *<p>Status: vector/matrix support function.
18248 *
18249 *<!-- Given: -->
18250 * @param psi double angle (radians)
18251 *
18252 * Given and returned:
18253 * @param r double[3][3] <u>given & retuned</u>r-matrix, rotated
18254 *
18255 * Sign convention: The matrix can be used to rotate the reference
18256 * frame of a vector. Calling This function with positive psi
18257 * incorporates in the matrix an additional rotation, about the z-axis,
18258 * anticlockwise as seen looking towards the origin from positive z.
18259 *
18260 *<p>Called:<ul>
18261 * <li>{@link #jauIr} initialize r-matrix to identity
18262 * <li>{@link #jauRxr} product of two r-matrices
18263 * <li>{@link #jauCr} copy r-matrix
18264 * </ul>
18265 *@version 2008 May 22
18266 *
18267 * @since Release 20101201
18268 *
18269 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
18270 */
18271 public static void jauRz(double psi, double r[][])
18272 {
18273 double s, c, a[][] = new double[3][3], w[][];
18274
18275
18276 /* Matrix representing new rotation. */
18277 s = sin(psi);
18278 c = cos(psi);
18279 jauIr(a);
18280 a[0][0] = c;
18281 a[1][0] = -s;
18282 a[0][1] = s;
18283 a[1][1] = c;
18284
18285 /* Rotate. */
18286 w = jauRxr(a, r);
18287
18288 /* Return result. */
18289 jauCr(w, r);
18290
18291 return;
18292
18293 }
18294
18295
18296 /**
18297 * The CIO locator s, positioning the Celestial Intermediate Origin on
18298 * the equator of the Celestial Intermediate Pole, given the CIP's X,Y
18299 * coordinates. Compatible with IAU 2000A precession-nutation.
18300 *
18301 *<p>This function is derived from the International Astronomical Union's
18302 * SOFA (Standards Of Fundamental Astronomy) software collection.
18303 *
18304 *<p>Status: canonical model.
18305 *
18306 *<!-- Given: -->
18307 * @param date1 double TT as a 2-part Julian Date (Note 1)
18308 * @param date2 double TT as a 2-part Julian Date (Note 1)
18309 * @param x double CIP coordinates (Note 3)
18310 * @param y double CIP coordinates (Note 3)
18311 *
18312 * <!-- Returned (function value): -->
18313 * @return double the CIO locator s in radians (Note 2)
18314 *
18315 * <p>Notes:
18316 * <ol>
18317 *
18318 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
18319 * convenient way between the two arguments. For example,
18320 * JD(TT)=2450123.7 could be expressed in any of these ways,
18321 * among others:
18322 *<pre>
18323 * date1 date2
18324 *
18325 * 2450123.7 0.0 (JD method)
18326 * 2451545.0 -1421.3 (J2000 method)
18327 * 2400000.5 50123.2 (MJD method)
18328 * 2450123.5 0.2 (date & time method)
18329 *</pre>
18330 * The JD method is the most natural and convenient to use in
18331 * cases where the loss of several decimal digits of resolution
18332 * is acceptable. The J2000 method is best matched to the way
18333 * the argument is handled internally and will deliver the
18334 * optimum resolution. The MJD method and the date & time methods
18335 * are both good compromises between resolution and convenience.
18336 *
18337 * <li> The CIO locator s is the difference between the right ascensions
18338 * of the same point in two systems: the two systems are the GCRS
18339 * and the CIP,CIO, and the point is the ascending node of the
18340 * CIP equator. The quantity s remains below 0.1 arcsecond
18341 * throughout 1900-2100.
18342 *
18343 * <li> The series used to compute s is in fact for s+XY/2, where X and Y
18344 * are the x and y components of the CIP unit vector; this series
18345 * is more compact than a direct series for s would be. This
18346 * function requires X,Y to be supplied by the caller, who is
18347 * responsible for providing values that are consistent with the
18348 * supplied date.
18349 *
18350 * <li> The model is consistent with the IAU 2000A precession-nutation.
18351 *</ol>
18352 *<p>Called:<ul>
18353 * <li>{@link #jauFal03} mean anomaly of the Moon
18354 * <li>{@link #jauFalp03} mean anomaly of the Sun
18355 * <li>{@link #jauFaf03} mean argument of the latitude of the Moon
18356 * <li>{@link #jauFad03} mean elongation of the Moon from the Sun
18357 * <li>{@link #jauFaom03} mean longitude of the Moon's ascending node
18358 * <li>{@link #jauFave03} mean longitude of Venus
18359 * <li>{@link #jauFae03} mean longitude of Earth
18360 * <li>{@link #jauFapa03} general accumulated precession in longitude
18361 * </ul>
18362 *<p>References:
18363 *
18364 * <p>Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
18365 * "Expressions for the Celestial Intermediate Pole and Celestial
18366 * Ephemeris Origin consistent with the IAU 2000A precession-
18367 * nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
18368 *
18369 * n.b. The celestial ephemeris origin (CEO) was renamed "celestial
18370 * intermediate origin" (CIO) by IAU 2006 Resolution 2.
18371 *
18372 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
18373 * IERS Technical Note No. 32, BKG (2004)
18374 *
18375 *@version 2010 January 18
18376 *
18377 * @since Release 20101201
18378 *
18379 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
18380 */
18381 public static double jauS00(double date1, double date2, double x, double y)
18382 {
18383 /* Time since J2000.0, in Julian centuries */
18384 double t;
18385
18386 /* Miscellaneous */
18387 int i, j;
18388 double a, w0, w1, w2, w3, w4, w5;
18389
18390 /* Fundamental arguments */
18391 double fa[] = new double[8];
18392
18393 /* Returned value */
18394 double s;
18395
18396 /* --------------------- */
18397 /* The series for s+XY/2 */
18398 /* --------------------- */
18399
18400 /* Polynomial coefficients */
18401 final double sp[] = {
18402
18403 /* 1-6 */
18404 94.00e-6,
18405 3808.35e-6,
18406 -119.94e-6,
18407 -72574.09e-6,
18408 27.70e-6,
18409 15.61e-6
18410 };
18411
18412 /* Terms of order t^0 */
18413 final TERM s0[] = {
18414
18415 /* 1-10 */
18416 new TERM(new int[]{ 0, 0, 0, 0, 1, 0, 0, 0}, -2640.73e-6, 0.39e-6 ),
18417 new TERM(new int[]{ 0, 0, 0, 0, 2, 0, 0, 0}, -63.53e-6, 0.02e-6 ),
18418 new TERM(new int[]{ 0, 0, 2, -2, 3, 0, 0, 0}, -11.75e-6, -0.01e-6 ),
18419 new TERM(new int[]{ 0, 0, 2, -2, 1, 0, 0, 0}, -11.21e-6, -0.01e-6 ),
18420 new TERM(new int[]{ 0, 0, 2, -2, 2, 0, 0, 0}, 4.57e-6, 0.00e-6 ),
18421 new TERM(new int[]{ 0, 0, 2, 0, 3, 0, 0, 0}, -2.02e-6, 0.00e-6 ),
18422 new TERM(new int[]{ 0, 0, 2, 0, 1, 0, 0, 0}, -1.98e-6, 0.00e-6 ),
18423 new TERM(new int[]{ 0, 0, 0, 0, 3, 0, 0, 0}, 1.72e-6, 0.00e-6 ),
18424 new TERM(new int[]{ 0, 1, 0, 0, 1, 0, 0, 0}, 1.41e-6, 0.01e-6 ),
18425 new TERM(new int[]{ 0, 1, 0, 0, -1, 0, 0, 0}, 1.26e-6, 0.01e-6 ),
18426
18427 /* 11-20 */
18428 new TERM(new int[]{ 1, 0, 0, 0, -1, 0, 0, 0}, 0.63e-6, 0.00e-6 ),
18429 new TERM(new int[]{ 1, 0, 0, 0, 1, 0, 0, 0}, 0.63e-6, 0.00e-6 ),
18430 new TERM(new int[]{ 0, 1, 2, -2, 3, 0, 0, 0}, -0.46e-6, 0.00e-6 ),
18431 new TERM(new int[]{ 0, 1, 2, -2, 1, 0, 0, 0}, -0.45e-6, 0.00e-6 ),
18432 new TERM(new int[]{ 0, 0, 4, -4, 4, 0, 0, 0}, -0.36e-6, 0.00e-6 ),
18433 new TERM(new int[]{ 0, 0, 1, -1, 1, -8, 12, 0}, 0.24e-6, 0.12e-6 ),
18434 new TERM(new int[]{ 0, 0, 2, 0, 0, 0, 0, 0}, -0.32e-6, 0.00e-6 ),
18435 new TERM(new int[]{ 0, 0, 2, 0, 2, 0, 0, 0}, -0.28e-6, 0.00e-6 ),
18436 new TERM(new int[]{ 1, 0, 2, 0, 3, 0, 0, 0}, -0.27e-6, 0.00e-6 ),
18437 new TERM(new int[]{ 1, 0, 2, 0, 1, 0, 0, 0}, -0.26e-6, 0.00e-6 ),
18438
18439 /* 21-30 */
18440 new TERM(new int[]{ 0, 0, 2, -2, 0, 0, 0, 0}, 0.21e-6, 0.00e-6 ),
18441 new TERM(new int[]{ 0, 1, -2, 2, -3, 0, 0, 0}, -0.19e-6, 0.00e-6 ),
18442 new TERM(new int[]{ 0, 1, -2, 2, -1, 0, 0, 0}, -0.18e-6, 0.00e-6 ),
18443 new TERM(new int[]{ 0, 0, 0, 0, 0, 8,-13, -1}, 0.10e-6, -0.05e-6 ),
18444 new TERM(new int[]{ 0, 0, 0, 2, 0, 0, 0, 0}, -0.15e-6, 0.00e-6 ),
18445 new TERM(new int[]{ 2, 0, -2, 0, -1, 0, 0, 0}, 0.14e-6, 0.00e-6 ),
18446 new TERM(new int[]{ 0, 1, 2, -2, 2, 0, 0, 0}, 0.14e-6, 0.00e-6 ),
18447 new TERM(new int[]{ 1, 0, 0, -2, 1, 0, 0, 0}, -0.14e-6, 0.00e-6 ),
18448 new TERM(new int[]{ 1, 0, 0, -2, -1, 0, 0, 0}, -0.14e-6, 0.00e-6 ),
18449 new TERM(new int[]{ 0, 0, 4, -2, 4, 0, 0, 0}, -0.13e-6, 0.00e-6 ),
18450
18451 /* 31-33 */
18452 new TERM(new int[]{ 0, 0, 2, -2, 4, 0, 0, 0}, 0.11e-6, 0.00e-6 ),
18453 new TERM(new int[]{ 1, 0, -2, 0, -3, 0, 0, 0}, -0.11e-6, 0.00e-6 ),
18454 new TERM(new int[]{ 1, 0, -2, 0, -1, 0, 0, 0}, -0.11e-6, 0.00e-6 )
18455 };
18456
18457 /* Terms of order t^1 */
18458 final TERM s1[] ={
18459
18460 /* 1-3 */
18461 new TERM(new int[]{ 0, 0, 0, 0, 2, 0, 0, 0}, -0.07e-6, 3.57e-6 ),
18462 new TERM(new int[]{ 0, 0, 0, 0, 1, 0, 0, 0}, 1.71e-6, -0.03e-6 ),
18463 new TERM(new int[]{ 0, 0, 2, -2, 3, 0, 0, 0}, 0.00e-6, 0.48e-6 )
18464 };
18465
18466 /* Terms of order t^2 */
18467 final TERM s2[] ={
18468
18469 /* 1-10 */
18470 new TERM(new int[]{ 0, 0, 0, 0, 1, 0, 0, 0}, 743.53e-6, -0.17e-6 ),
18471 new TERM(new int[]{ 0, 0, 2, -2, 2, 0, 0, 0}, 56.91e-6, 0.06e-6 ),
18472 new TERM(new int[]{ 0, 0, 2, 0, 2, 0, 0, 0}, 9.84e-6, -0.01e-6 ),
18473 new TERM(new int[]{ 0, 0, 0, 0, 2, 0, 0, 0}, -8.85e-6, 0.01e-6 ),
18474 new TERM(new int[]{ 0, 1, 0, 0, 0, 0, 0, 0}, -6.38e-6, -0.05e-6 ),
18475 new TERM(new int[]{ 1, 0, 0, 0, 0, 0, 0, 0}, -3.07e-6, 0.00e-6 ),
18476 new TERM(new int[]{ 0, 1, 2, -2, 2, 0, 0, 0}, 2.23e-6, 0.00e-6 ),
18477 new TERM(new int[]{ 0, 0, 2, 0, 1, 0, 0, 0}, 1.67e-6, 0.00e-6 ),
18478 new TERM(new int[]{ 1, 0, 2, 0, 2, 0, 0, 0}, 1.30e-6, 0.00e-6 ),
18479 new TERM(new int[]{ 0, 1, -2, 2, -2, 0, 0, 0}, 0.93e-6, 0.00e-6 ),
18480
18481 /* 11-20 */
18482 new TERM(new int[]{ 1, 0, 0, -2, 0, 0, 0, 0}, 0.68e-6, 0.00e-6 ),
18483 new TERM(new int[]{ 0, 0, 2, -2, 1, 0, 0, 0}, -0.55e-6, 0.00e-6 ),
18484 new TERM(new int[]{ 1, 0, -2, 0, -2, 0, 0, 0}, 0.53e-6, 0.00e-6 ),
18485 new TERM(new int[]{ 0, 0, 0, 2, 0, 0, 0, 0}, -0.27e-6, 0.00e-6 ),
18486 new TERM(new int[]{ 1, 0, 0, 0, 1, 0, 0, 0}, -0.27e-6, 0.00e-6 ),
18487 new TERM(new int[]{ 1, 0, -2, -2, -2, 0, 0, 0}, -0.26e-6, 0.00e-6 ),
18488 new TERM(new int[]{ 1, 0, 0, 0, -1, 0, 0, 0}, -0.25e-6, 0.00e-6 ),
18489 new TERM(new int[]{ 1, 0, 2, 0, 1, 0, 0, 0}, 0.22e-6, 0.00e-6 ),
18490 new TERM(new int[]{ 2, 0, 0, -2, 0, 0, 0, 0}, -0.21e-6, 0.00e-6 ),
18491 new TERM(new int[]{ 2, 0, -2, 0, -1, 0, 0, 0}, 0.20e-6, 0.00e-6 ),
18492
18493 /* 21-25 */
18494 new TERM(new int[]{ 0, 0, 2, 2, 2, 0, 0, 0}, 0.17e-6, 0.00e-6 ),
18495 new TERM(new int[]{ 2, 0, 2, 0, 2, 0, 0, 0}, 0.13e-6, 0.00e-6 ),
18496 new TERM(new int[]{ 2, 0, 0, 0, 0, 0, 0, 0}, -0.13e-6, 0.00e-6 ),
18497 new TERM(new int[]{ 1, 0, 2, -2, 2, 0, 0, 0}, -0.12e-6, 0.00e-6 ),
18498 new TERM(new int[]{ 0, 0, 2, 0, 0, 0, 0, 0}, -0.11e-6, 0.00e-6 )
18499 };
18500
18501 /* Terms of order t^3 */
18502 final TERM s3[] ={
18503
18504 /* 1-4 */
18505 new TERM(new int[]{ 0, 0, 0, 0, 1, 0, 0, 0}, 0.30e-6, -23.51e-6 ),
18506 new TERM(new int[]{ 0, 0, 2, -2, 2, 0, 0, 0}, -0.03e-6, -1.39e-6 ),
18507 new TERM(new int[]{ 0, 0, 2, 0, 2, 0, 0, 0}, -0.01e-6, -0.24e-6 ),
18508 new TERM(new int[]{ 0, 0, 0, 0, 2, 0, 0, 0}, 0.00e-6, 0.22e-6 )
18509 };
18510
18511 /* Terms of order t^4 */
18512 final TERM s4[] ={
18513
18514 /* 1-1 */
18515 new TERM(new int[]{ 0, 0, 0, 0, 1, 0, 0, 0}, -0.26e-6, -0.01e-6 )
18516 };
18517
18518 /* Number of terms in the series */
18519 final int NS0 = s0.length;
18520 final int NS1 = s1.length;
18521 final int NS2 = s2.length;
18522 final int NS3 = s3.length;
18523 final int NS4 = s4.length;
18524
18525 /*--------------------------------------------------------------------*/
18526
18527 /* Interval between fundamental epoch J2000.0 and current date (JC). */
18528 t = ((date1 - DJ00) + date2) / DJC;
18529
18530 /* Fundamental Arguments (from IERS Conventions 2003) */
18531
18532 /* Mean anomaly of the Moon. */
18533 fa[0] = jauFal03(t);
18534
18535 /* Mean anomaly of the Sun. */
18536 fa[1] = jauFalp03(t);
18537
18538 /* Mean longitude of the Moon minus that of the ascending node. */
18539 fa[2] = jauFaf03(t);
18540
18541 /* Mean elongation of the Moon from the Sun. */
18542 fa[3] = jauFad03(t);
18543
18544 /* Mean longitude of the ascending node of the Moon. */
18545 fa[4] = jauFaom03(t);
18546
18547 /* Mean longitude of Venus. */
18548 fa[5] = jauFave03(t);
18549
18550 /* Mean longitude of Earth. */
18551 fa[6] = jauFae03(t);
18552
18553 /* General precession in longitude. */
18554 fa[7] = jauFapa03(t);
18555
18556 /* Evaluate s. */
18557 w0 = sp[0];
18558 w1 = sp[1];
18559 w2 = sp[2];
18560 w3 = sp[3];
18561 w4 = sp[4];
18562 w5 = sp[5];
18563
18564 for (i = NS0-1; i >= 0; i--) {
18565 a = 0.0;
18566 for (j = 0; j < 8; j++) {
18567 a += (double)s0[i].nfa[j] * fa[j];
18568 }
18569 w0 += s0[i].s * sin(a) + s0[i].c * cos(a);
18570 }
18571
18572 for (i = NS1-1; i >= 0; i--) {
18573 a = 0.0;
18574 for (j = 0; j < 8; j++) {
18575 a += (double)s1[i].nfa[j] * fa[j];
18576 }
18577 w1 += s1[i].s * sin(a) + s1[i].c * cos(a);
18578 }
18579
18580 for (i = NS2-1; i >= 0; i--) {
18581 a = 0.0;
18582 for (j = 0; j < 8; j++) {
18583 a += (double)s2[i].nfa[j] * fa[j];
18584 }
18585 w2 += s2[i].s * sin(a) + s2[i].c * cos(a);
18586 }
18587
18588 for (i = NS3-1; i >= 0; i--) {
18589 a = 0.0;
18590 for (j = 0; j < 8; j++) {
18591 a += (double)s3[i].nfa[j] * fa[j];
18592 }
18593 w3 += s3[i].s * sin(a) + s3[i].c * cos(a);
18594 }
18595
18596 for (i = NS4-1; i >= 0; i--) {
18597 a = 0.0;
18598 for (j = 0; j < 8; j++) {
18599 a += (double)s4[i].nfa[j] * fa[j];
18600 }
18601 w4 += s4[i].s * sin(a) + s4[i].c * cos(a);
18602 }
18603
18604 s = (w0 +
18605 (w1 +
18606 (w2 +
18607 (w3 +
18608 (w4 +
18609 w5 * t) * t) * t) * t) * t) * DAS2R - x*y/2.0;
18610
18611 return s;
18612
18613 }
18614
18615
18616 /**
18617 * The CIO locator s, positioning the Celestial Intermediate Origin on
18618 * the equator of the Celestial Intermediate Pole, using the IAU 2000A
18619 * precession-nutation model.
18620 *
18621 *<p>This function is derived from the International Astronomical Union's
18622 * SOFA (Standards Of Fundamental Astronomy) software collection.
18623 *
18624 *<p>Status: support function.
18625 *
18626 *<!-- Given: -->
18627 * @param date1 double TT as a 2-part Julian Date (Note 1)
18628 * @param date2 double TT as a 2-part Julian Date (Note 1)
18629 *
18630 * <!-- Returned (function value): -->
18631 * @return double the CIO locator s in radians (Note 2)
18632 *
18633 * <p>Notes:
18634 * <ol>
18635 *
18636 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
18637 * convenient way between the two arguments. For example,
18638 * JD(TT)=2450123.7 could be expressed in any of these ways,
18639 * among others:
18640 *<pre>
18641 * date1 date2
18642 *
18643 * 2450123.7 0.0 (JD method)
18644 * 2451545.0 -1421.3 (J2000 method)
18645 * 2400000.5 50123.2 (MJD method)
18646 * 2450123.5 0.2 (date & time method)
18647 *</pre>
18648 * The JD method is the most natural and convenient to use in
18649 * cases where the loss of several decimal digits of resolution
18650 * is acceptable. The J2000 method is best matched to the way
18651 * the argument is handled internally and will deliver the
18652 * optimum resolution. The MJD method and the date & time methods
18653 * are both good compromises between resolution and convenience.
18654 *
18655 * <li> The CIO locator s is the difference between the right ascensions
18656 * of the same point in two systems. The two systems are the GCRS
18657 * and the CIP,CIO, and the point is the ascending node of the
18658 * CIP equator. The CIO locator s remains a small fraction of
18659 * 1 arcsecond throughout 1900-2100.
18660 *
18661 * <li> The series used to compute s is in fact for s+XY/2, where X and Y
18662 * are the x and y components of the CIP unit vector; this series
18663 * is more compact than a direct series for s would be. The present
18664 * function uses the full IAU 2000A nutation model when predicting
18665 * the CIP position. Faster results, with no significant loss of
18666 * accuracy, can be obtained via the function jauS00b, which uses
18667 * instead the IAU 2000B truncated model.
18668 *</ol>
18669 *<p>Called:<ul>
18670 * <li>{@link #jauPnm00a} classical NPB matrix, IAU 2000A
18671 * <li>{@link #jauBpn2xy} extract CIP X,Y from the BPN matrix
18672 * <li>{@link #jauS00} the CIO locator s, given X,Y, IAU 2000A
18673 * </ul>
18674 *<p>References:
18675 *
18676 * <p>Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
18677 * "Expressions for the Celestial Intermediate Pole and Celestial
18678 * Ephemeris Origin consistent with the IAU 2000A precession-
18679 * nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
18680 *
18681 * n.b. The celestial ephemeris origin (CEO) was renamed "celestial
18682 * intermediate origin" (CIO) by IAU 2006 Resolution 2.
18683 *
18684 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
18685 * IERS Technical Note No. 32, BKG (2004)
18686 *
18687 *@version 2010 January 18
18688 *
18689 * @since Release 20101201
18690 *
18691 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
18692 */
18693 public static double jauS00a(double date1, double date2)
18694 {
18695 double s;
18696
18697
18698 /* Bias-precession-nutation-matrix, IAU 2000A. */
18699 double rbpn[][] = jauPnm00a(date1, date2);
18700
18701 /* Extract the CIP coordinates. */
18702 CelestialIntermediatePole cip = jauBpn2xy(rbpn);
18703
18704 /* Compute the CIO locator s, given the CIP coordinates. */
18705 s = jauS00(date1, date2, cip.x, cip.y);
18706
18707 return s;
18708
18709 }
18710
18711
18712 /**
18713 * The CIO locator s, positioning the Celestial Intermediate Origin on
18714 * the equator of the Celestial Intermediate Pole, using the IAU 2000B
18715 * precession-nutation model.
18716 *
18717 *<p>This function is derived from the International Astronomical Union's
18718 * SOFA (Standards Of Fundamental Astronomy) software collection.
18719 *
18720 *<p>Status: support function.
18721 *
18722 *<!-- Given: -->
18723 * @param date1 double TT as a 2-part Julian Date (Note 1)
18724 * @param date2 double TT as a 2-part Julian Date (Note 1)
18725 *
18726 * <!-- Returned (function value): -->
18727 * @return double the CIO locator s in radians (Note 2)
18728 *
18729 * <p>Notes:
18730 * <ol>
18731 *
18732 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
18733 * convenient way between the two arguments. For example,
18734 * JD(TT)=2450123.7 could be expressed in any of these ways,
18735 * among others:
18736 *<pre>
18737 * date1 date2
18738 *
18739 * 2450123.7 0.0 (JD method)
18740 * 2451545.0 -1421.3 (J2000 method)
18741 * 2400000.5 50123.2 (MJD method)
18742 * 2450123.5 0.2 (date & time method)
18743 *</pre>
18744 * The JD method is the most natural and convenient to use in
18745 * cases where the loss of several decimal digits of resolution
18746 * is acceptable. The J2000 method is best matched to the way
18747 * the argument is handled internally and will deliver the
18748 * optimum resolution. The MJD method and the date & time methods
18749 * are both good compromises between resolution and convenience.
18750 *
18751 * <li> The CIO locator s is the difference between the right ascensions
18752 * of the same point in two systems. The two systems are the GCRS
18753 * and the CIP,CIO, and the point is the ascending node of the
18754 * CIP equator. The CIO locator s remains a small fraction of
18755 * 1 arcsecond throughout 1900-2100.
18756 *
18757 * <li> The series used to compute s is in fact for s+XY/2, where X and Y
18758 * are the x and y components of the CIP unit vector; this series
18759 * is more compact than a direct series for s would be. The present
18760 * function uses the IAU 2000B truncated nutation model when
18761 * predicting the CIP position. The function jauS00a uses instead
18762 * the full IAU 2000A model, but with no significant increase in
18763 * accuracy and at some cost in speed.
18764 *</ol>
18765 *<p>Called:<ul>
18766 * <li>{@link #jauPnm00b} classical NPB matrix, IAU 2000B
18767 * <li>{@link #jauBpn2xy} extract CIP X,Y from the BPN matrix
18768 * <li>{@link #jauS00} the CIO locator s, given X,Y, IAU 2000A
18769 * </ul>
18770 *<p>References:
18771 *
18772 * <p>Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
18773 * "Expressions for the Celestial Intermediate Pole and Celestial
18774 * Ephemeris Origin consistent with the IAU 2000A precession-
18775 * nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
18776 *
18777 * n.b. The celestial ephemeris origin (CEO) was renamed "celestial
18778 * intermediate origin" (CIO) by IAU 2006 Resolution 2.
18779 *
18780 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
18781 * IERS Technical Note No. 32, BKG (2004)
18782 *
18783 *@version 2010 January 18
18784 *
18785 * @since Release 20101201
18786 *
18787 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
18788 */
18789 public static double jauS00b(double date1, double date2)
18790 {
18791 double rbpn[][] = new double[3][3], s;
18792
18793
18794 /* Bias-precession-nutation-matrix, IAU 2000B. */
18795 rbpn = jauPnm00b(date1, date2);
18796
18797 /* Extract the CIP coordinates. */
18798 CelestialIntermediatePole cip = jauBpn2xy(rbpn);
18799
18800 /* Compute the CIO locator s, given the CIP coordinates. */
18801 s = jauS00(date1, date2, cip.x, cip.y);
18802
18803 return s;
18804
18805 }
18806
18807
18808 /**
18809 * The CIO locator s, positioning the Celestial Intermediate Origin on
18810 * the equator of the Celestial Intermediate Pole, given the CIP's X,Y
18811 * coordinates. Compatible with IAU 2006/2000A precession-nutation.
18812 *
18813 *<p>This function is derived from the International Astronomical Union's
18814 * SOFA (Standards Of Fundamental Astronomy) software collection.
18815 *
18816 *<p>Status: canonical model.
18817 *
18818 *<!-- Given: -->
18819 * @param date1 double TT as a 2-part Julian Date (Note 1)
18820 * @param date2 double TT as a 2-part Julian Date (Note 1)
18821 * @param x double CIP coordinates (Note 3)
18822 * @param y double CIP coordinates (Note 3)
18823 *
18824 * <!-- Returned (function value): -->
18825 * @return double the CIO locator s in radians (Note 2)
18826 *
18827 * <p>Notes:
18828 * <ol>
18829 *
18830 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
18831 * convenient way between the two arguments. For example,
18832 * JD(TT)=2450123.7 could be expressed in any of these ways,
18833 * among others:
18834 *<pre>
18835 * date1 date2
18836 *
18837 * 2450123.7 0.0 (JD method)
18838 * 2451545.0 -1421.3 (J2000 method)
18839 * 2400000.5 50123.2 (MJD method)
18840 * 2450123.5 0.2 (date & time method)
18841 *</pre>
18842 * The JD method is the most natural and convenient to use in
18843 * cases where the loss of several decimal digits of resolution
18844 * is acceptable. The J2000 method is best matched to the way
18845 * the argument is handled internally and will deliver the
18846 * optimum resolution. The MJD method and the date & time methods
18847 * are both good compromises between resolution and convenience.
18848 *
18849 * <li> The CIO locator s is the difference between the right ascensions
18850 * of the same point in two systems: the two systems are the GCRS
18851 * and the CIP,CIO, and the point is the ascending node of the
18852 * CIP equator. The quantity s remains below 0.1 arcsecond
18853 * throughout 1900-2100.
18854 *
18855 * <li> The series used to compute s is in fact for s+XY/2, where X and Y
18856 * are the x and y components of the CIP unit vector; this series
18857 * is more compact than a direct series for s would be. This
18858 * function requires X,Y to be supplied by the caller, who is
18859 * responsible for providing values that are consistent with the
18860 * supplied date.
18861 *
18862 * <li> The model is consistent with the "P03" precession (Capitaine et
18863 * al. 2003), adopted by IAU 2006 Resolution 1, 2006, and the
18864 * IAU 2000A nutation (with P03 adjustments).
18865 *</ol>
18866 *<p>Called:<ul>
18867 * <li>{@link #jauFal03} mean anomaly of the Moon
18868 * <li>{@link #jauFalp03} mean anomaly of the Sun
18869 * <li>{@link #jauFaf03} mean argument of the latitude of the Moon
18870 * <li>{@link #jauFad03} mean elongation of the Moon from the Sun
18871 * <li>{@link #jauFaom03} mean longitude of the Moon's ascending node
18872 * <li>{@link #jauFave03} mean longitude of Venus
18873 * <li>{@link #jauFae03} mean longitude of Earth
18874 * <li>{@link #jauFapa03} general accumulated precession in longitude
18875 * </ul>
18876 *<p>References:
18877 *
18878 * <p>Capitaine, N., Wallace, P.T. & Chapront, J., 2003, Astron.
18879 * Astrophys. 432, 355
18880 *
18881 * <p>McCarthy, D.D., Petit, G. (eds.) 2004, IERS Conventions (2003),
18882 * IERS Technical Note No. 32, BKG
18883 *
18884 *@version 2009 December 17
18885 *
18886 * @since Release 20101201
18887 *
18888 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
18889 */
18890 public static double jauS06(double date1, double date2, double x, double y)
18891 {
18892 /* Time since J2000.0, in Julian centuries */
18893 double t;
18894
18895 /* Miscellaneous */
18896 int i, j;
18897 double a, w0, w1, w2, w3, w4, w5;
18898
18899 /* Fundamental arguments */
18900 double fa[] = new double[8];
18901
18902 /* Returned value */
18903 double s;
18904
18905 /* --------------------- */
18906 /* The series for s+XY/2 */
18907 /* --------------------- */
18908
18909 /* Polynomial coefficients */
18910 final double sp[] = {
18911
18912 /* 1-6 */
18913 94.00e-6,
18914 3808.65e-6,
18915 -122.68e-6,
18916 -72574.11e-6,
18917 27.98e-6,
18918 15.62e-6
18919 };
18920
18921 /* Terms of order t^0 */
18922 final TERM s0[] = {
18923
18924 /* 1-10 */
18925 new TERM(new int[]{ 0, 0, 0, 0, 1, 0, 0, 0}, -2640.73e-6, 0.39e-6 ),
18926 new TERM(new int[]{ 0, 0, 0, 0, 2, 0, 0, 0}, -63.53e-6, 0.02e-6 ),
18927 new TERM(new int[]{ 0, 0, 2, -2, 3, 0, 0, 0}, -11.75e-6, -0.01e-6 ),
18928 new TERM(new int[]{ 0, 0, 2, -2, 1, 0, 0, 0}, -11.21e-6, -0.01e-6 ),
18929 new TERM(new int[]{ 0, 0, 2, -2, 2, 0, 0, 0}, 4.57e-6, 0.00e-6 ),
18930 new TERM(new int[]{ 0, 0, 2, 0, 3, 0, 0, 0}, -2.02e-6, 0.00e-6 ),
18931 new TERM(new int[]{ 0, 0, 2, 0, 1, 0, 0, 0}, -1.98e-6, 0.00e-6 ),
18932 new TERM(new int[]{ 0, 0, 0, 0, 3, 0, 0, 0}, 1.72e-6, 0.00e-6 ),
18933 new TERM(new int[]{ 0, 1, 0, 0, 1, 0, 0, 0}, 1.41e-6, 0.01e-6 ),
18934 new TERM(new int[]{ 0, 1, 0, 0, -1, 0, 0, 0}, 1.26e-6, 0.01e-6 ),
18935
18936 /* 11-20 */
18937 new TERM(new int[]{ 1, 0, 0, 0, -1, 0, 0, 0}, 0.63e-6, 0.00e-6 ),
18938 new TERM(new int[]{ 1, 0, 0, 0, 1, 0, 0, 0}, 0.63e-6, 0.00e-6 ),
18939 new TERM(new int[]{ 0, 1, 2, -2, 3, 0, 0, 0}, -0.46e-6, 0.00e-6 ),
18940 new TERM(new int[]{ 0, 1, 2, -2, 1, 0, 0, 0}, -0.45e-6, 0.00e-6 ),
18941 new TERM(new int[]{ 0, 0, 4, -4, 4, 0, 0, 0}, -0.36e-6, 0.00e-6 ),
18942 new TERM(new int[]{ 0, 0, 1, -1, 1, -8, 12, 0}, 0.24e-6, 0.12e-6 ),
18943 new TERM(new int[]{ 0, 0, 2, 0, 0, 0, 0, 0}, -0.32e-6, 0.00e-6 ),
18944 new TERM(new int[]{ 0, 0, 2, 0, 2, 0, 0, 0}, -0.28e-6, 0.00e-6 ),
18945 new TERM(new int[]{ 1, 0, 2, 0, 3, 0, 0, 0}, -0.27e-6, 0.00e-6 ),
18946 new TERM(new int[]{ 1, 0, 2, 0, 1, 0, 0, 0}, -0.26e-6, 0.00e-6 ),
18947
18948 /* 21-30 */
18949 new TERM(new int[]{ 0, 0, 2, -2, 0, 0, 0, 0}, 0.21e-6, 0.00e-6 ),
18950 new TERM(new int[]{ 0, 1, -2, 2, -3, 0, 0, 0}, -0.19e-6, 0.00e-6 ),
18951 new TERM(new int[]{ 0, 1, -2, 2, -1, 0, 0, 0}, -0.18e-6, 0.00e-6 ),
18952 new TERM(new int[]{ 0, 0, 0, 0, 0, 8,-13, -1}, 0.10e-6, -0.05e-6 ),
18953 new TERM(new int[]{ 0, 0, 0, 2, 0, 0, 0, 0}, -0.15e-6, 0.00e-6 ),
18954 new TERM(new int[]{ 2, 0, -2, 0, -1, 0, 0, 0}, 0.14e-6, 0.00e-6 ),
18955 new TERM(new int[]{ 0, 1, 2, -2, 2, 0, 0, 0}, 0.14e-6, 0.00e-6 ),
18956 new TERM(new int[]{ 1, 0, 0, -2, 1, 0, 0, 0}, -0.14e-6, 0.00e-6 ),
18957 new TERM(new int[]{ 1, 0, 0, -2, -1, 0, 0, 0}, -0.14e-6, 0.00e-6 ),
18958 new TERM(new int[]{ 0, 0, 4, -2, 4, 0, 0, 0}, -0.13e-6, 0.00e-6 ),
18959
18960 /* 31-33 */
18961 new TERM(new int[]{ 0, 0, 2, -2, 4, 0, 0, 0}, 0.11e-6, 0.00e-6 ),
18962 new TERM(new int[]{ 1, 0, -2, 0, -3, 0, 0, 0}, -0.11e-6, 0.00e-6 ),
18963 new TERM(new int[]{ 1, 0, -2, 0, -1, 0, 0, 0}, -0.11e-6, 0.00e-6 )
18964 };
18965
18966 /* Terms of order t^1 */
18967 final TERM s1[] = {
18968
18969 /* 1 - 3 */
18970 new TERM(new int[]{ 0, 0, 0, 0, 2, 0, 0, 0}, -0.07e-6, 3.57e-6 ),
18971 new TERM(new int[]{ 0, 0, 0, 0, 1, 0, 0, 0}, 1.73e-6, -0.03e-6 ),
18972 new TERM(new int[]{ 0, 0, 2, -2, 3, 0, 0, 0}, 0.00e-6, 0.48e-6 )
18973 };
18974
18975 /* Terms of order t^2 */
18976 final TERM s2[] = {
18977
18978 /* 1-10 */
18979 new TERM(new int[]{ 0, 0, 0, 0, 1, 0, 0, 0}, 743.52e-6, -0.17e-6 ),
18980 new TERM(new int[]{ 0, 0, 2, -2, 2, 0, 0, 0}, 56.91e-6, 0.06e-6 ),
18981 new TERM(new int[]{ 0, 0, 2, 0, 2, 0, 0, 0}, 9.84e-6, -0.01e-6 ),
18982 new TERM(new int[]{ 0, 0, 0, 0, 2, 0, 0, 0}, -8.85e-6, 0.01e-6 ),
18983 new TERM(new int[]{ 0, 1, 0, 0, 0, 0, 0, 0}, -6.38e-6, -0.05e-6 ),
18984 new TERM(new int[]{ 1, 0, 0, 0, 0, 0, 0, 0}, -3.07e-6, 0.00e-6 ),
18985 new TERM(new int[]{ 0, 1, 2, -2, 2, 0, 0, 0}, 2.23e-6, 0.00e-6 ),
18986 new TERM(new int[]{ 0, 0, 2, 0, 1, 0, 0, 0}, 1.67e-6, 0.00e-6 ),
18987 new TERM(new int[]{ 1, 0, 2, 0, 2, 0, 0, 0}, 1.30e-6, 0.00e-6 ),
18988 new TERM(new int[]{ 0, 1, -2, 2, -2, 0, 0, 0}, 0.93e-6, 0.00e-6 ),
18989
18990 /* 11-20 */
18991 new TERM(new int[]{ 1, 0, 0, -2, 0, 0, 0, 0}, 0.68e-6, 0.00e-6 ),
18992 new TERM(new int[]{ 0, 0, 2, -2, 1, 0, 0, 0}, -0.55e-6, 0.00e-6 ),
18993 new TERM(new int[]{ 1, 0, -2, 0, -2, 0, 0, 0}, 0.53e-6, 0.00e-6 ),
18994 new TERM(new int[]{ 0, 0, 0, 2, 0, 0, 0, 0}, -0.27e-6, 0.00e-6 ),
18995 new TERM(new int[]{ 1, 0, 0, 0, 1, 0, 0, 0}, -0.27e-6, 0.00e-6 ),
18996 new TERM(new int[]{ 1, 0, -2, -2, -2, 0, 0, 0}, -0.26e-6, 0.00e-6 ),
18997 new TERM(new int[]{ 1, 0, 0, 0, -1, 0, 0, 0}, -0.25e-6, 0.00e-6 ),
18998 new TERM(new int[]{ 1, 0, 2, 0, 1, 0, 0, 0}, 0.22e-6, 0.00e-6 ),
18999 new TERM(new int[]{ 2, 0, 0, -2, 0, 0, 0, 0}, -0.21e-6, 0.00e-6 ),
19000 new TERM(new int[]{ 2, 0, -2, 0, -1, 0, 0, 0}, 0.20e-6, 0.00e-6 ),
19001
19002 /* 21-25 */
19003 new TERM(new int[]{ 0, 0, 2, 2, 2, 0, 0, 0}, 0.17e-6, 0.00e-6 ),
19004 new TERM(new int[]{ 2, 0, 2, 0, 2, 0, 0, 0}, 0.13e-6, 0.00e-6 ),
19005 new TERM(new int[]{ 2, 0, 0, 0, 0, 0, 0, 0}, -0.13e-6, 0.00e-6 ),
19006 new TERM(new int[]{ 1, 0, 2, -2, 2, 0, 0, 0}, -0.12e-6, 0.00e-6 ),
19007 new TERM(new int[]{ 0, 0, 2, 0, 0, 0, 0, 0}, -0.11e-6, 0.00e-6 )
19008 };
19009
19010 /* Terms of order t^3 */
19011 final TERM s3[] = {
19012
19013 /* 1-4 */
19014 new TERM(new int[]{ 0, 0, 0, 0, 1, 0, 0, 0}, 0.30e-6, -23.42e-6 ),
19015 new TERM(new int[]{ 0, 0, 2, -2, 2, 0, 0, 0}, -0.03e-6, -1.46e-6 ),
19016 new TERM(new int[]{ 0, 0, 2, 0, 2, 0, 0, 0}, -0.01e-6, -0.25e-6 ),
19017 new TERM(new int[]{ 0, 0, 0, 0, 2, 0, 0, 0}, 0.00e-6, 0.23e-6 )
19018 };
19019
19020 /* Terms of order t^4 */
19021 final TERM s4[] = {
19022
19023 /* 1-1 */
19024 new TERM(new int[]{ 0, 0, 0, 0, 1, 0, 0, 0}, -0.26e-6, -0.01e-6 )
19025 };
19026
19027 /* Number of terms in the series */
19028 final int NS0 = s0.length;
19029 final int NS1 = s1.length;
19030 final int NS2 = s2.length;
19031 final int NS3 = s3.length;
19032 final int NS4 = s4.length;
19033
19034 /*--------------------------------------------------------------------*/
19035
19036 /* Interval between fundamental epoch J2000.0 and current date (JC). */
19037 t = ((date1 - DJ00) + date2) / DJC;
19038
19039 /* Fundamental Arguments (from IERS Conventions 2003) */
19040
19041 /* Mean anomaly of the Moon. */
19042 fa[0] = jauFal03(t);
19043
19044 /* Mean anomaly of the Sun. */
19045 fa[1] = jauFalp03(t);
19046
19047 /* Mean longitude of the Moon minus that of the ascending node. */
19048 fa[2] = jauFaf03(t);
19049
19050 /* Mean elongation of the Moon from the Sun. */
19051 fa[3] = jauFad03(t);
19052
19053 /* Mean longitude of the ascending node of the Moon. */
19054 fa[4] = jauFaom03(t);
19055
19056 /* Mean longitude of Venus. */
19057 fa[5] = jauFave03(t);
19058
19059 /* Mean longitude of Earth. */
19060 fa[6] = jauFae03(t);
19061
19062 /* General precession in longitude. */
19063 fa[7] = jauFapa03(t);
19064
19065 /* Evaluate s. */
19066 w0 = sp[0];
19067 w1 = sp[1];
19068 w2 = sp[2];
19069 w3 = sp[3];
19070 w4 = sp[4];
19071 w5 = sp[5];
19072
19073 for (i = NS0-1; i >= 0; i--) {
19074 a = 0.0;
19075 for (j = 0; j < 8; j++) {
19076 a += (double)s0[i].nfa[j] * fa[j];
19077 }
19078 w0 += s0[i].s * sin(a) + s0[i].c * cos(a);
19079 }
19080
19081 for (i = NS1-1; i >= 0; i--) {
19082 a = 0.0;
19083 for (j = 0; j < 8; j++) {
19084 a += (double)s1[i].nfa[j] * fa[j];
19085 }
19086 w1 += s1[i].s * sin(a) + s1[i].c * cos(a);
19087 }
19088
19089 for (i = NS2-1; i >= 0; i--) {
19090 a = 0.0;
19091 for (j = 0; j < 8; j++) {
19092 a += (double)s2[i].nfa[j] * fa[j];
19093 }
19094 w2 += s2[i].s * sin(a) + s2[i].c * cos(a);
19095 }
19096
19097 for (i = NS3-1; i >= 0; i--) {
19098 a = 0.0;
19099 for (j = 0; j < 8; j++) {
19100 a += (double)s3[i].nfa[j] * fa[j];
19101 }
19102 w3 += s3[i].s * sin(a) + s3[i].c * cos(a);
19103 }
19104
19105 for (i = NS4-1; i >= 0; i--) {
19106 a = 0.0;
19107 for (j = 0; j < 8; j++) {
19108 a += (double)s4[i].nfa[j] * fa[j];
19109 }
19110 w4 += s4[i].s * sin(a) + s4[i].c * cos(a);
19111 }
19112
19113 s = (w0 +
19114 (w1 +
19115 (w2 +
19116 (w3 +
19117 (w4 +
19118 w5 * t) * t) * t) * t) * t) * DAS2R - x*y/2.0;
19119
19120 return s;
19121
19122 }
19123
19124
19125 /**
19126 * The CIO locator s, positioning the Celestial Intermediate Origin on
19127 * the equator of the Celestial Intermediate Pole, using the IAU 2006
19128 * precession and IAU 2000A nutation models.
19129 *
19130 *<p>This function is derived from the International Astronomical Union's
19131 * SOFA (Standards Of Fundamental Astronomy) software collection.
19132 *
19133 *<p>Status: support function.
19134 *
19135 *<!-- Given: -->
19136 * @param date1 double TT as a 2-part Julian Date (Note 1)
19137 * @param date2 double TT as a 2-part Julian Date (Note 1)
19138 *
19139 * <!-- Returned (function value): -->
19140 * @return double the CIO locator s in radians (Note 2)
19141 *
19142 * <p>Notes:
19143 * <ol>
19144 *
19145 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
19146 * convenient way between the two arguments. For example,
19147 * JD(TT)=2450123.7 could be expressed in any of these ways,
19148 * among others:
19149 *<pre>
19150 * date1 date2
19151 *
19152 * 2450123.7 0.0 (JD method)
19153 * 2451545.0 -1421.3 (J2000 method)
19154 * 2400000.5 50123.2 (MJD method)
19155 * 2450123.5 0.2 (date & time method)
19156 *</pre>
19157 * The JD method is the most natural and convenient to use in
19158 * cases where the loss of several decimal digits of resolution
19159 * is acceptable. The J2000 method is best matched to the way
19160 * the argument is handled internally and will deliver the
19161 * optimum resolution. The MJD method and the date & time methods
19162 * are both good compromises between resolution and convenience.
19163 *
19164 * <li> The CIO locator s is the difference between the right ascensions
19165 * of the same point in two systems. The two systems are the GCRS
19166 * and the CIP,CIO, and the point is the ascending node of the
19167 * CIP equator. The CIO locator s remains a small fraction of
19168 * 1 arcsecond throughout 1900-2100.
19169 *
19170 * <li> The series used to compute s is in fact for s+XY/2, where X and Y
19171 * are the x and y components of the CIP unit vector; this series is
19172 * more compact than a direct series for s would be. The present
19173 * function uses the full IAU 2000A nutation model when predicting
19174 * the CIP position.
19175 *</ol>
19176 *<p>Called:<ul>
19177 * <li>{@link #jauPnm06a} classical NPB matrix, IAU 2006/2000A
19178 * <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
19179 * <li>{@link #jauS06} the CIO locator s, given X,Y, IAU 2006
19180 * </ul>
19181 *<p>References:
19182 *
19183 * <p>Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
19184 * "Expressions for the Celestial Intermediate Pole and Celestial
19185 * Ephemeris Origin consistent with the IAU 2000A precession-
19186 * nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
19187 *
19188 * n.b. The celestial ephemeris origin (CEO) was renamed "celestial
19189 * intermediate origin" (CIO) by IAU 2006 Resolution 2.
19190 *
19191 * <p>Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855
19192 *
19193 * <p>McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003),
19194 * IERS Technical Note No. 32, BKG
19195 *
19196 * <p>Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981
19197 *
19198 *@version 2010 January 18
19199 *
19200 * @since Release 20101201
19201 *
19202 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
19203 */
19204 public static double jauS06a(double date1, double date2)
19205 {
19206 double rnpb[][] = new double[3][3], s;
19207
19208
19209 /* Bias-precession-nutation-matrix, IAU 20006/2000A. */
19210 rnpb = jauPnm06a(date1, date2);
19211
19212 /* Extract the CIP coordinates. */
19213 CelestialIntermediatePole cip = jauBpn2xy(rnpb);
19214
19215 /* Compute the CIO locator s, given the CIP coordinates. */
19216 s = jauS06(date1, date2, cip.x, cip.y);
19217
19218 return s;
19219
19220 }
19221
19222
19223 /**
19224 * Convert spherical coordinates to Cartesian.
19225 *
19226 *<p>This function is derived from the International Astronomical Union's
19227 * SOFA (Standards Of Fundamental Astronomy) software collection.
19228 *
19229 *<p>Status: vector/matrix support function.
19230 *
19231 *<!-- Given: -->
19232 * @param theta double longitude angle (radians)
19233 * @param phi double latitude angle (radians)
19234 *
19235 *<!-- Returned: -->
19236 * @return c double[3] <u>returned</u> direction cosines
19237 *
19238 *@version 2008 October 28
19239 *
19240 * @since Release 20101201
19241 *
19242 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
19243 */
19244 public static double[] jauS2c(double theta, double phi )
19245 {
19246 double cp, c[] = new double[3];
19247
19248
19249 cp = cos(phi);
19250 c[0] = cos(theta) * cp;
19251 c[1] = sin(theta) * cp;
19252 c[2] = sin(phi);
19253
19254 return c;
19255
19256 }
19257
19258
19259 /**
19260 * Convert spherical polar coordinates to p-vector.
19261 *
19262 *<p>This function is derived from the International Astronomical Union's
19263 * SOFA (Standards Of Fundamental Astronomy) software collection.
19264 *
19265 *<p>Status: vector/matrix support function.
19266 *
19267 *<!-- Given: -->
19268 * @param theta double longitude angle (radians)
19269 * @param phi double latitude angle (radians)
19270 * @param r double radial distance
19271 *
19272 *<!-- Returned: -->
19273 * @return p double[3] <u>returned</u> Cartesian coordinates
19274 *
19275 *<p>Called:<ul>
19276 * <li>{@link #jauS2c} spherical coordinates to unit vector
19277 * <li>{@link #jauSxp} multiply p-vector by scalar
19278 * </ul>
19279 *@version 2008 May 11
19280 *
19281 * @since Release 20101201
19282 *
19283 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
19284 */
19285 public static double[] jauS2p(double theta, double phi, double r )
19286 {
19287 double p[];
19288 double u[] = new double[3];
19289
19290
19291 u = jauS2c(theta,phi);
19292 p = jauSxp(r,u);
19293
19294 return p;
19295
19296 }
19297
19298
19299 /**
19300 * Convert position/velocity from spherical to Cartesian coordinates.
19301 *
19302 *<p>This function is derived from the International Astronomical Union's
19303 * SOFA (Standards Of Fundamental Astronomy) software collection.
19304 *
19305 *<p>Status: vector/matrix support function.
19306 *
19307 *<!-- Given: -->
19308 * @param theta double longitude angle (radians)
19309 * @param phi double latitude angle (radians)
19310 * @param r double radial distance
19311 * @param td double rate of change of theta
19312 * @param pd double rate of change of phi
19313 * @param rd double rate of change of r
19314 *
19315 *<!-- Returned: -->
19316 * @return pv double[2][3] <u>returned</u> pv-vector
19317 *
19318 *@version 2008 May 25
19319 *
19320 * @since Release 20101201
19321 *
19322 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
19323 */
19324 public static double[][] jauS2pv(double theta, double phi, double r,
19325 double td, double pd, double rd)
19326 {
19327 double pv[][] = new double[2][3];
19328 double st, ct, sp, cp, rcp, x, y, rpd, w;
19329
19330
19331 st = sin(theta);
19332 ct = cos(theta);
19333 sp = sin(phi);
19334 cp = cos(phi);
19335 rcp = r * cp;
19336 x = rcp * ct;
19337 y = rcp * st;
19338 rpd = r * pd;
19339 w = rpd*sp - cp*rd;
19340
19341 pv[0][0] = x;
19342 pv[0][1] = y;
19343 pv[0][2] = r * sp;
19344 pv[1][0] = -y*td - w*ct;
19345 pv[1][1] = x*td - w*st;
19346 pv[1][2] = rpd*cp + sp*rd;
19347
19348 return pv;
19349
19350 }
19351
19352
19353 /**
19354 * Multiply a pv-vector by two scalars.
19355 *
19356 *<p>This function is derived from the International Astronomical Union's
19357 * SOFA (Standards Of Fundamental Astronomy) software collection.
19358 *
19359 *<p>Status: vector/matrix support function.
19360 *
19361 *<!-- Given: -->
19362 * @param s1 double scalar to multiply position component by
19363 * @param s2 double scalar to multiply velocity component by
19364 * @param pv double[2][3] pv-vector
19365 *
19366 *<!-- Returned: -->
19367 * @return spv double[2][3] <u>returned</u> pv-vector: p scaled by s1, v scaled by s2
19368 *
19369 * Note:
19370 * It is permissible for pv and spv to be the same array.
19371 *
19372 *<p>Called:<ul>
19373 * <li>{@link #jauSxp} multiply p-vector by scalar
19374 * </ul>
19375 *@version 2008 October 28
19376 *
19377 * @since Release 20101201
19378 *
19379 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
19380 */
19381 public static double[][] jauS2xpv(double s1, double s2, double pv[][])
19382 {
19383 double spv[][] = new double[2][3];
19384 spv[0] = jauSxp(s1, pv[0]);
19385 spv[1] =jauSxp(s2, pv[1]);
19386
19387 return spv;
19388
19389 }
19390
19391
19392 /**
19393 * Angular separation between two p-vectors.
19394 *
19395 *<p>This function is derived from the International Astronomical Union's
19396 * SOFA (Standards Of Fundamental Astronomy) software collection.
19397 *
19398 *<p>Status: vector/matrix support function.
19399 *
19400 *<!-- Given: -->
19401 * @param a double[3] first p-vector (not necessarily unit length)
19402 * @param b double[3] second p-vector (not necessarily unit length)
19403 *
19404 * <!-- Returned (function value): -->
19405 * @return double angular separation (radians, always positive)
19406 *
19407 * <p>Notes:
19408 * <ol>
19409 *
19410 * <li> If either vector is null, a zero result is returned.
19411 *
19412 * <li> The angular separation is most simply formulated in terms of
19413 * scalar product. However, this gives poor accuracy for angles
19414 * near zero and pi. The present algorithm uses both cross product
19415 * and dot product, to deliver full accuracy whatever the size of
19416 * the angle.
19417 *</ol>
19418 *<p>Called:<ul>
19419 * <li>{@link #jauPxp} vector product of two p-vectors
19420 * <li>{@link #jauPm} modulus of p-vector
19421 * <li>{@link #jauPdp} scalar product of two p-vectors
19422 * </ul>
19423 *@version 2008 May 22
19424 *
19425 * @since Release 20101201
19426 *
19427 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
19428 */
19429 public static double jauSepp(double a[] , double b[] )
19430 {
19431 double axb[] = new double[3], ss, cs, s;
19432
19433
19434 /* Sine of angle between the vectors, multiplied by the two moduli. */
19435 axb = jauPxp(a,b);
19436 ss = jauPm(axb);
19437
19438 /* Cosine of the angle, multiplied by the two moduli. */
19439 cs = jauPdp(a, b);
19440
19441 /* The angle. */
19442 s = ((ss != 0.0) || (cs != 0.0)) ? atan2(ss, cs) : 0.0;
19443
19444 return s;
19445
19446 }
19447
19448
19449 /**
19450 * Angular separation between two sets of spherical coordinates.
19451 *
19452 *<p>This function is derived from the International Astronomical Union's
19453 * SOFA (Standards Of Fundamental Astronomy) software collection.
19454 *
19455 *<p>Status: vector/matrix support function.
19456 *
19457 *<!-- Given: -->
19458 * @param al double first longitude (radians)
19459 * @param ap double first latitude (radians)
19460 * @param bl double second longitude (radians)
19461 * @param bp double second latitude (radians)
19462 *
19463 * <!-- Returned (function value): -->
19464 * @return double angular separation (radians)
19465 *
19466 *<p>Called:<ul>
19467 * <li>{@link #jauS2c} spherical coordinates to unit vector
19468 * <li>{@link #jauSepp} angular separation between two p-vectors
19469 * </ul>
19470 *@version 2008 May 16
19471 *
19472 * @since Release 20101201
19473 *
19474 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
19475 */
19476 public static double jauSeps(double al, double ap, double bl, double bp)
19477 {
19478 double ac[] = new double[3], bc[] = new double[3], s;
19479
19480
19481 /* Spherical to Cartesian. */
19482 ac = jauS2c(al,ap);
19483 bc = jauS2c(bl,bp);
19484
19485 /* Angle between the vectors. */
19486 s = jauSepp(ac, bc);
19487
19488 return s;
19489
19490 }
19491
19492
19493 /**
19494 * The TIO locator s', positioning the Terrestrial Intermediate Origin
19495 * on the equator of the Celestial Intermediate Pole.
19496 *
19497 *<p>This function is derived from the International Astronomical Union's
19498 * SOFA (Standards Of Fundamental Astronomy) software collection.
19499 *
19500 *<p>Status: canonical model.
19501 *
19502 *<!-- Given: -->
19503 * @param date1 double TT as a 2-part Julian Date (Note 1)
19504 * @param date2 double TT as a 2-part Julian Date (Note 1)
19505 *
19506 * <!-- Returned (function value): -->
19507 * @return double the TIO locator s' in radians (Note 2)
19508 *
19509 * <p>Notes:
19510 * <ol>
19511 *
19512 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
19513 * convenient way between the two arguments. For example,
19514 * JD(TT)=2450123.7 could be expressed in any of these ways,
19515 * among others:
19516 *<pre>
19517 * date1 date2
19518 *
19519 * 2450123.7 0.0 (JD method)
19520 * 2451545.0 -1421.3 (J2000 method)
19521 * 2400000.5 50123.2 (MJD method)
19522 * 2450123.5 0.2 (date & time method)
19523 *</pre>
19524 * The JD method is the most natural and convenient to use in
19525 * cases where the loss of several decimal digits of resolution
19526 * is acceptable. The J2000 method is best matched to the way
19527 * the argument is handled internally and will deliver the
19528 * optimum resolution. The MJD method and the date & time methods
19529 * are both good compromises between resolution and convenience.
19530 *
19531 * <li> The TIO locator s' is obtained from polar motion observations by
19532 * numerical integration, and so is in essence unpredictable.
19533 * However, it is dominated by a secular drift of about
19534 * 47 microarcseconds per century, which is the approximation
19535 * evaluated by the present function.
19536 *</ol>
19537 *<p>Reference:
19538 *
19539 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
19540 * IERS Technical Note No. 32, BKG (2004)
19541 *
19542 *@version 2008 May 24
19543 *
19544 * @since Release 20101201
19545 *
19546 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
19547 */
19548 public static double jauSp00(double date1, double date2)
19549 {
19550 double t, sp;
19551
19552
19553 /* Interval between fundamental epoch J2000.0 and current date (JC). */
19554 t = ((date1 - DJ00) + date2) / DJC;
19555
19556 /* Approximate s'. */
19557 sp = -47e-6 * t * DAS2R;
19558
19559 return sp;
19560
19561 }
19562
19563
19564 /**
19565 * Star proper motion: update star catalog data for space motion.
19566 *
19567 *<p>This function is derived from the International Astronomical Union's
19568 * SOFA (Standards Of Fundamental Astronomy) software collection.
19569 *
19570 *<p>Status: support function.
19571 *
19572 *<!-- Given: -->
19573 * @param ra1 double right ascension (radians), before
19574 * @param dec1 double declination (radians), before
19575 * @param pmr1 double RA proper motion (radians/year), before
19576 * @param pmd1 double Dec proper motion (radians/year), before
19577 * @param px1 double parallax (arcseconds), before
19578 * @param rv1 double radial velocity (km/s, +ve = receding), before
19579 * @param ep1a double "before" epoch, part A (Note 1)
19580 * @param ep1b double "before" epoch, part B (Note 1)
19581 * @param ep2a double "after" epoch, part A (Note 1)
19582 * @param ep2b double "after" epoch, part B (Note 1)
19583 *
19584 *<!-- Returned: -->
19585 * @return ra2 double <u>returned</u> right ascension (radians), after
19586 * dec2 double <u>returned</u> declination (radians), after
19587 * pmr2 double <u>returned</u> RA proper motion (radians/year), after
19588 * pmd2 double <u>returned</u> Dec proper motion (radians/year), after
19589 * px2 double <u>returned</u> parallax (arcseconds), after
19590 * rv2 double <u>returned</u> radial velocity (km/s, +ve = receding), after
19591 *
19592 * <!-- Returned (function value): -->
19593 * @return int status:
19594 * -1 = system error (should not occur)
19595 * 0 = no warnings or errors
19596 * 1 = distance overridden (Note 6)
19597 * 2 = excessive velocity (Note 7)
19598 * 4 = solution didn't converge (Note 8)
19599 * else = binary logical OR of the above warnings
19600 *FIXME need to return the status as well.
19601 * <p>Notes:
19602 * <ol>
19603 *
19604 * <li> The starting and ending TDB dates ep1a+ep1b and ep2a+ep2b are
19605 * Julian Dates, apportioned in any convenient way between the two
19606 * parts (A and B). For example, JD(TDB)=2450123.7 could be
19607 * expressed in any of these ways, among others:
19608 *<pre>
19609 * epna epnb
19610 *
19611 * 2450123.7 0.0 (JD method)
19612 * 2451545.0 -1421.3 (J2000 method)
19613 * 2400000.5 50123.2 (MJD method)
19614 * 2450123.5 0.2 (date & time method)
19615 *</pre>
19616 * The JD method is the most natural and convenient to use in
19617 * cases where the loss of several decimal digits of resolution
19618 * is acceptable. The J2000 method is best matched to the way
19619 * the argument is handled internally and will deliver the
19620 * optimum resolution. The MJD method and the date & time methods
19621 * are both good compromises between resolution and convenience.
19622 *
19623 * <li> In accordance with normal star-catalog conventions, the object's
19624 * right ascension and declination are freed from the effects of
19625 * secular aberration. The frame, which is aligned to the catalog
19626 * equator and equinox, is Lorentzian and centered on the SSB.
19627 *
19628 * The proper motions are the rate of change of the right ascension
19629 * and declination at the catalog epoch and are in radians per TDB
19630 * Julian year.
19631 *
19632 * The parallax and radial velocity are in the same frame.
19633 *
19634 * <li> Care is needed with units. The star coordinates are in radians
19635 * and the proper motions in radians per Julian year, but the
19636 * parallax is in arcseconds.
19637 *
19638 * <li> The RA proper motion is in terms of coordinate angle, not true
19639 * angle. If the catalog uses arcseconds for both RA and Dec proper
19640 * motions, the RA proper motion will need to be divided by cos(Dec)
19641 * before use.
19642 *
19643 * <li> Straight-line motion at constant speed, in the inertial frame,
19644 * is assumed.
19645 *
19646 * <li> An extremely small (or zero or negative) parallax is interpreted
19647 * to mean that the object is on the "celestial sphere", the radius
19648 * of which is an arbitrary (large) value (see the jauStarpv
19649 * function for the value used). When the distance is overridden in
19650 * this way, the status, initially zero, has 1 added to it.
19651 *
19652 * <li> If the space velocity is a significant fraction of c (see the
19653 * constant VMAX in the function jauStarpv), it is arbitrarily set
19654 * to zero. When this action occurs, 2 is added to the status.
19655 *
19656 * <li> The relativistic adjustment carried out in the jauStarpv function
19657 * involves an iterative calculation. If the process fails to
19658 * converge within a set number of iterations, 4 is added to the
19659 * status.
19660 *</ol>
19661 *<p>Called:<ul>
19662 * <li>{@link #jauStarpv} star catalog data to space motion pv-vector
19663 * <li>{@link #jauPvu} update a pv-vector
19664 * <li>{@link #jauPdp} scalar product of two p-vectors
19665 * <li>{@link #jauPvstar} space motion pv-vector to star catalog data
19666 * </ul>
19667 *@version 2008 May 16
19668 *
19669 * @since Release 20101201
19670 *
19671 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
19672 */
19673 public static CatalogCoords jauStarpm(double ra1, double dec1,
19674 double pmr1, double pmd1, double px1, double rv1,
19675 double ep1a, double ep1b, double ep2a, double ep2b) throws JSOFAInternalError
19676 {
19677 double pv1[][] = new double[2][3], tl1, dt, pv[][] = new double[2][3], r2, rdv, v2, c2mv2, tl2,
19678 pv2[][] = new double[2][3];
19679 jauStarpv(ra1, dec1, pmr1, pmd1, px1, rv1, pv1);
19680
19681 /* Light time when observed (days). */
19682 tl1 = jauPm(pv1[0]) / DC;
19683
19684 /* Time interval, "before" to "after" (days). */
19685 dt = (ep2a - ep1a) + (ep2b - ep1b);
19686
19687 /* Move star along track from the "before" observed position to the */
19688 /* "after" geometric position. */
19689 pv = jauPvu(dt + tl1, pv1);
19690
19691 /* From this geometric position, deduce the observed light time (days) */
19692 /* at the "after" epoch (with theoretically unneccessary error check). */
19693 r2 = jauPdp(pv[0], pv[0]);
19694 rdv = jauPdp(pv[0], pv[1]);
19695 v2 = jauPdp(pv[1], pv[1]);
19696 c2mv2 = DC*DC - v2;
19697 if (c2mv2 <= 0) throw new JSOFAInternalError("internal error", -1);
19698 tl2 = (-rdv + sqrt(rdv*rdv + c2mv2*r2)) / c2mv2;
19699
19700 /* Move the position along track from the observed place at the */
19701 /* "before" epoch to the observed place at the "after" epoch. */
19702 pv2 =jauPvu(dt + (tl1 - tl2), pv1 );
19703
19704 /* Space motion pv-vector to RA,Dec etc. at the "after" epoch. */
19705 CatalogCoords cat = jauPvstar(pv2);
19706
19707 return cat;
19708
19709 }
19710
19711
19712 /**
19713 * Convert star catalog coordinates to position+velocity vector.
19714 *
19715 *<p>This function is derived from the International Astronomical Union's
19716 * SOFA (Standards Of Fundamental Astronomy) software collection.
19717 *
19718 *<p>Status: support function.
19719 *
19720 * Given (Note 1):
19721 * @param ra double right ascension (radians)
19722 * @param dec double declination (radians)
19723 * @param pmr double RA proper motion (radians/year)
19724 * @param pmd double Dec proper motion (radians/year)
19725 * @param px double parallax (arcseconds)
19726 * @param rv double radial velocity (km/s, positive = receding)
19727 *
19728 * Returned (Note 2):
19729 * @param pv double[2][3] pv-vector (au, au/day)
19730 *
19731 * <!-- Returned (function value): -->
19732 * @return int status:
19733 * 0 = no warnings
19734 * 1 = distance overridden (Note 6)
19735 * 2 = excessive speed (Note 7)
19736 * 4 = solution didn't converge (Note 8)
19737 * else = binary logical OR of the above
19738 *
19739 * <p>Notes:
19740 * <ol>
19741 *
19742 * <li> The star data accepted by this function are "observables" for an
19743 * imaginary observer at the solar-system barycenter. Proper motion
19744 * and radial velocity are, strictly, in terms of barycentric
19745 * coordinate time, TCB. For most practical applications, it is
19746 * permissible to neglect the distinction between TCB and ordinary
19747 * "proper" time on Earth (TT/TAI). The result will, as a rule, be
19748 * limited by the intrinsic accuracy of the proper-motion and
19749 * radial-velocity data; moreover, the pv-vector is likely to be
19750 * merely an intermediate result, so that a change of time unit
19751 * would cancel out overall.
19752 *
19753 * In accordance with normal star-catalog conventions, the object's
19754 * right ascension and declination are freed from the effects of
19755 * secular aberration. The frame, which is aligned to the catalog
19756 * equator and equinox, is Lorentzian and centered on the SSB.
19757 *
19758 * <li> The resulting position and velocity pv-vector is with respect to
19759 * the same frame and, like the catalog coordinates, is freed from
19760 * the effects of secular aberration. Should the "coordinate
19761 * direction", where the object was located at the catalog epoch, be
19762 * required, it may be obtained by calculating the magnitude of the
19763 * position vector pv[0][0-2] dividing by the speed of light in
19764 * au/day to give the light-time, and then multiplying the space
19765 * velocity pv[1][0-2] by this light-time and adding the result to
19766 * pv[0][0-2].
19767 *
19768 * Summarizing, the pv-vector returned is for most stars almost
19769 * identical to the result of applying the standard geometrical
19770 * "space motion" transformation. The differences, which are the
19771 * subject of the Stumpff paper referenced below, are:
19772 *
19773 * (i) In stars with significant radial velocity and proper motion,
19774 * the constantly changing light-time distorts the apparent proper
19775 * motion. Note that this is a classical, not a relativistic,
19776 * effect.
19777 *
19778 * (ii) The transformation complies with special relativity.
19779 *
19780 * <li> Care is needed with units. The star coordinates are in radians
19781 * and the proper motions in radians per Julian year, but the
19782 * parallax is in arcseconds; the radial velocity is in km/s, but
19783 * the pv-vector result is in au and au/day.
19784 *
19785 * <li> The RA proper motion is in terms of coordinate angle, not true
19786 * angle. If the catalog uses arcseconds for both RA and Dec proper
19787 * motions, the RA proper motion will need to be divided by cos(Dec)
19788 * before use.
19789 *
19790 * <li> Straight-line motion at constant speed, in the inertial frame,
19791 * is assumed.
19792 *
19793 * <li> An extremely small (or zero or negative) parallax is interpreted
19794 * to mean that the object is on the "celestial sphere", the radius
19795 * of which is an arbitrary (large) value (see the constant PXMIN).
19796 * When the distance is overridden in this way, the status,
19797 * initially zero, has 1 added to it.
19798 *
19799 * <li> If the space velocity is a significant fraction of c (see the
19800 * constant VMAX), it is arbitrarily set to zero. When this action
19801 * occurs, 2 is added to the status.
19802 *
19803 * <li> The relativistic adjustment involves an iterative calculation.
19804 * If the process fails to converge within a set number (IMAX) of
19805 * iterations, 4 is added to the status.
19806 *
19807 * <li> The inverse transformation is performed by the function
19808 * jauPvstar.
19809 *</ol>
19810 *<p>Called:<ul>
19811 * <li>{@link #jauS2pv} spherical coordinates to pv-vector
19812 * <li>{@link #jauPm} modulus of p-vector
19813 * <li>{@link #jauZp} zero p-vector
19814 * <li>{@link #jauPn} decompose p-vector into modulus and direction
19815 * <li>{@link #jauPdp} scalar product of two p-vectors
19816 * <li>{@link #jauSxp} multiply p-vector by scalar
19817 * <li>{@link #jauPmp} p-vector minus p-vector
19818 * <li>{@link #jauPpp} p-vector plus p-vector
19819 * </ul>
19820 *<p>Reference:
19821 *
19822 * Stumpff, P., 1985, Astron.Astrophys. 144, 232-240.
19823 *
19824 *@version 2009 July 6
19825 *
19826 * @since Release 20101201
19827 *
19828 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
19829 */
19830 public static int jauStarpv(double ra, double dec,
19831 double pmr, double pmd, double px, double rv,
19832 double pv[][])
19833 {
19834 /* Smallest allowed parallax */
19835 final double PXMIN = 1e-7;
19836
19837 /* Largest allowed speed (fraction of c) */
19838 final double VMAX = 0.5;
19839
19840 /* Maximum number of iterations for relativistic solution */
19841 final int IMAX = 100;
19842
19843 int i, iwarn;
19844 double w, r, rd, rad, decd, v, x[] = new double[3], usr[] = new double[3], ust[] = new double[3],
19845 vsr, vst, betst, betsr, bett, betr,
19846 dd, ddel, ur[] = new double[3], ut[] = new double[3],
19847 d = 0.0, del = 0.0, /* to prevent */
19848 odd = 0.0, oddel = 0.0, /* compiler */
19849 od = 0.0, odel = 0.0; /* warnings */
19850
19851
19852 /* Distance (au). */
19853 if (px >= PXMIN) {
19854 w = px;
19855 iwarn = 0;
19856 } else {
19857 w = PXMIN;
19858 iwarn = 1;
19859 }
19860 r = DR2AS / w;
19861
19862 /* Radial velocity (au/day). */
19863 rd = DAYSEC * rv * 1e3 / DAU;
19864
19865 /* Proper motion (radian/day). */
19866 rad = pmr / DJY;
19867 decd = pmd / DJY;
19868
19869 /* To pv-vector (au,au/day). */
19870 double[][] pvt = jauS2pv(ra, dec, r, rad, decd, rd);
19871 jauCpv(pvt,pv);
19872
19873 /* If excessive velocity, arbitrarily set it to zero. */
19874 v = jauPm(pv[1]);
19875 if (v / DC > VMAX) {
19876 jauZp(pv[1]);
19877 iwarn += 2;
19878 }
19879
19880 /* Isolate the radial component of the velocity (au/day). */
19881 NormalizedVector nv = jauPn(pv[0]);
19882 w = nv.r;
19883 x = nv.u;
19884 vsr = jauPdp(x, pv[1]);
19885 usr = jauSxp(vsr,x);
19886
19887 /* Isolate the transverse component of the velocity (au/day). */
19888 ust = jauPmp(pv[1], usr);
19889 vst = jauPm(ust);
19890
19891 /* Special-relativity dimensionless parameters. */
19892 betsr = vsr / DC;
19893 betst = vst / DC;
19894
19895 /* Determine the inertial-to-observed relativistic correction terms. */
19896 bett = betst;
19897 betr = betsr;
19898 for (i = 0; i < IMAX; i++) {
19899 d = 1.0 + betr;
19900 del = sqrt(1.0 - betr*betr - bett*bett) - 1.0;
19901 betr = d * betsr + del;
19902 bett = d * betst;
19903 if (i > 0) {
19904 dd = abs(d - od);
19905 ddel = abs(del - odel);
19906 if ((i > 1) && (dd >= odd) && (ddel >= oddel)) break;
19907 odd = dd;
19908 oddel = ddel;
19909 }
19910 od = d;
19911 odel = del;
19912 }
19913 if (i >= IMAX) iwarn += 4;
19914
19915 /* Replace observed radial velocity with inertial value. */
19916 w = (betsr != 0.0) ? d + del / betsr : 1.0;
19917 ur = jauSxp(w,usr);
19918
19919 /* Replace observed tangential velocity with inertial value. */
19920 ut = jauSxp(d,ust);
19921
19922 /* Combine the two to obtain the inertial space velocity. */
19923 pv[1] = jauPpp(ur, ut);
19924
19925 /* Return the status. */
19926 return iwarn;
19927
19928 }
19929
19930
19931 /**
19932 * Multiply a p-vector by a scalar.
19933 *
19934 *<p>This function is derived from the International Astronomical Union's
19935 * SOFA (Standards Of Fundamental Astronomy) software collection.
19936 *
19937 *<p>Status: vector/matrix support function.
19938 *
19939 *<!-- Given: -->
19940 * @param s double scalar
19941 * @param p double[3] p-vector
19942 *
19943 *<!-- Returned: -->
19944 * @return sp double[3] <u>returned</u> s * p
19945 *
19946 *
19947 *
19948 *@version 2008 October 28
19949 *
19950 * @since Release 20101201
19951 *
19952 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
19953 */
19954 public static double[] jauSxp(double s, double p[])
19955 {
19956 double sp[] = new double[3];
19957 sp[0] = s * p[0];
19958 sp[1] = s * p[1];
19959 sp[2] = s * p[2];
19960
19961 return sp;
19962
19963 }
19964
19965
19966 /**
19967 * Multiply a pv-vector by a scalar.
19968 *
19969 *<p>This function is derived from the International Astronomical Union's
19970 * SOFA (Standards Of Fundamental Astronomy) software collection.
19971 *
19972 *<p>Status: vector/matrix support function.
19973 *
19974 *<!-- Given: -->
19975 * @param s double scalar
19976 * @param pv double[2][3] pv-vector
19977 *
19978 *<!-- Returned: -->
19979 * @return spv double[2][3] <u>returned</u> s * pv
19980 *
19981 * Note:
19982 * It is permissible for pv and psv to be the same array
19983 *
19984 *<p>Called:<ul>
19985 * <li>{@link #jauS2xpv} multiply pv-vector by two scalars
19986 * </ul>
19987 *@version 2008 October 28
19988 *
19989 * @since Release 20101201
19990 *
19991 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
19992 */
19993 public static double[][] jauSxpv(double s, double pv[][])
19994 {
19995 double spv[][];
19996 spv = jauS2xpv(s, s, pv);
19997
19998 return spv;
19999
20000 }
20001
20002 /**
20003 *
20004 * Time scale transformation: International Atomic Time, TAI, to
20005 * Terrestrial Time, TT.
20006 *
20007 * <p>This function is derived from the International Astronomical Union's
20008 * SOFA (Standards of Fundamental Astronomy) software collection.
20009 *
20010 *<p>Status: canonical.
20011 *
20012 *<!-- Given: -->
20013 * @param tai1 double TAI as a 2-part Julian Date
20014 * @param tai2 double TAI as a 2-part Julian Date
20015 *
20016 *<!-- Returned:-->
20017 * @return JulianDate TT as a 2-part Julian Date
20018 *
20019 *
20020 * Note:
20021 *
20022 * tai1+tai2 is Julian Date, apportioned in any convenient way
20023 * between the two arguments, for example where tai1 is the Julian
20024 * Day Number and tai2 is the fraction of a day. The returned
20025 * tt1,tt2 follow suit.
20026 *
20027 *<p>References:
20028 *
20029 * McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
20030 * IERS Technical Note No. 32, BKG (2004)
20031 *
20032 * Explanatory Supplement to the Astronomical Almanac,
20033 * P. Kenneth Seidelmann (ed), University Science Books (1992)
20034 *
20035 *@version 2010 May 16
20036 *
20037 *@since SOFA release 2010-12-01
20038 *
20039 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
20040 */
20041 public static JulianDate jauTaitt(double tai1, double tai2)
20042 {
20043
20044 double tt1, tt2;
20045 /* TT minus TAI (days). */
20046 final double dtat = TTMTAI / DAYSEC;
20047
20048 /* Result, safeguarding precision. */
20049
20050 if ( abs(tai1) > abs(tai2) ) {
20051 tt1 = tai1;
20052 tt2 = tai2 + dtat;
20053 } else {
20054 tt1 = tai1 + dtat;
20055 tt2 = tai2;
20056 }
20057
20058
20059 return new JulianDate(tt1, tt2);
20060 };
20061
20062 /**
20063 *
20064 * Time scale transformation: International Atomic Time, TAI, to
20065 * Universal Time, UT1.
20066 *
20067 * <p>This function is derived from the International Astronomical Union's
20068 * SOFA (Standards of Fundamental Astronomy) software collection.
20069 *
20070 *<p>Status: canonical.
20071 *
20072 *<!-- Given: -->
20073 * @param tai1 double TAI as a 2-part Julian Date
20074 * @param tai2 double TAI as a 2-part Julian Date
20075 * @param dta double UT1-TAI in seconds
20076 *
20077 *<!-- Returned:-->
20078 * @return UT1 as a 2-part Julian Date
20079 *
20080 *
20081 *<p>Notes:
20082 * <ol>
20083 * <li> tai1+tai2 is Julian Date, apportioned in any convenient way
20084 * between the two arguments, for example where tai1 is the Julian
20085 * Day Number and tai2 is the fraction of a day. The returned
20086 * UT11,UT12 follow suit.
20087 *
20088 * <li> The argument dta, i.e. UT1-TAI, is an observed quantity, and is
20089 * available from IERS tabulations.
20090 * </ol>
20091 * Reference:
20092 *
20093 * Explanatory Supplement to the Astronomical Almanac,
20094 * P. Kenneth Seidelmann (ed), University Science Books (1992)
20095 *
20096 *@version 2010 May 16
20097 *
20098 *@since SOFA release 2010-12-01
20099 *
20100 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
20101 *
20102 */
20103 public static JulianDate jauTaiut1(double tai1, double tai2, double dta)
20104
20105 {
20106 double dtad,ut11, ut12;
20107
20108
20109 /* Result, safeguarding precision. */
20110 dtad = dta / DAYSEC;
20111 if ( abs(tai1) > abs(tai2) ) {
20112 ut11 = tai1;
20113 ut12 = tai2 + dtad;
20114 } else {
20115 ut11 = tai1 + dtad;
20116 ut12 = tai2;
20117 }
20118
20119 return new JulianDate(ut11, ut12);
20120 };
20121
20122 /**
20123 *
20124 * Time scale transformation: International Atomic Time, TAI, to
20125 * Coordinated Universal Time, UTC.
20126 *
20127 * <p>This function is derived from the International Astronomical Union's
20128 * SOFA (Standards of Fundamental Astronomy) software collection.
20129 *
20130 *<p>Status: canonical.
20131 *
20132 *<!-- Given: -->
20133 * @param tai1 TAI as a 2-part Julian Date (Note 1)
20134 * @param tai2 TAI as a 2-part Julian Date (Note 1)
20135 *
20136 *<!-- Returned:-->
20137 * @return UTC as a 2-part quasi Julian Date (Notes 1-3)
20138 *
20139 * Returned (function value):
20140 * int status: +1 = dubious year (Note 4)
20141 * 0 = OK
20142 * -1 = unacceptable date
20143 *
20144 *<p>Notes:</p>
20145 * <ol>
20146 * <li> tai1+tai2 is Julian Date, apportioned in any convenient way
20147 * between the two arguments, for example where tai1 is the Julian
20148 * Day Number and tai2 is the fraction of a day. The returned utc1
20149 * and utc2 form an analogous pair, except that a special convention
20150 * is used, to deal with the problem of leap seconds - see the next
20151 * note.
20152 *
20153 * <li> JD cannot unambiguously represent UTC during a leap second unless
20154 * special measures are taken. The convention in the present
20155 * function is that the JD day represents UTC days whether the
20156 * length is 86399, 86400 or 86401 SI seconds.
20157 *
20158 * <li> The function jauD2dtf can be used to transform the UTC quasi-JD
20159 * into calendar date and clock time, including UTC leap second
20160 * handling.
20161 *
20162 * <li> The warning status "dubious year" flags UTCs that predate the
20163 * introduction of the time scale and that are too far in the future
20164 * to be trusted. See jauDat for further details.
20165 * </ol>
20166 * Called:
20167 * <ul>
20168 * <li>{@link #jauJd2cal} JD to Gregorian calendar
20169 * <li>{@link #jauDat} delta(AT) = TAI-UTC
20170 * <li>{@link #jauCal2jd} Gregorian calendar to JD
20171 *</ul>
20172 *<p>References:
20173 *
20174 * McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
20175 * IERS Technical Note No. 32, BKG (2004)
20176 *
20177 * Explanatory Supplement to the Astronomical Almanac,
20178 * P. Kenneth Seidelmann (ed), University Science Books (1992)
20179 *
20180 *@version 2010 May 16
20181 *
20182 *@since SOFA release 2010-12-01
20183 *
20184 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
20185 * @throws JSOFAIllegalParameter
20186 * @throws JSOFAInternalError an internal error has occured
20187 */
20188 public static JulianDate jauTaiutc(double tai1, double tai2) throws JSOFAIllegalParameter, JSOFAInternalError
20189 {
20190 boolean big1;
20191 int i;
20192 double a1, a2,dats1, ddats, dats2, datd = 0.0, as1, as2, da, d1, d2, fd;
20193 double utc1, utc2;
20194
20195
20196 /* Put the two parts of the TAI into big-first order. */
20197 big1 = ( abs(tai1) >= abs(tai2) );
20198 if ( big1 ) {
20199 a1 = tai1;
20200 a2 = tai2;
20201 } else {
20202 a1 = tai2;
20203 a2 = tai1;
20204 }
20205
20206 /* See if the TAI can possibly be in a leap-second day. */
20207 d1 = a1;
20208 dats1 = 0.0;
20209 for ( i = -1; i <= 3; i++ ) {
20210 d2 = a2 + (double) i;
20211 Calendar dt;
20212 dt = jauJd2cal(d1, d2 );
20213 dats2 = jauDat(dt.iy, dt.im, dt.id, 0.0);
20214 //FIXME if ( js < 0 ) return -1;
20215 if ( i == -1 ) dats1 = dats2;
20216 ddats = dats2 - dats1;
20217 datd = dats1 / DAYSEC;
20218 if ( abs(ddats) >= 0.5 ) {
20219
20220 /* Yes. Get TAI for the start of the UTC day that */
20221 /* ends in a leap. */
20222 JulianDate jd = jauCal2jd(dt.iy, dt.im, dt.id );
20223 d1 = jd.djm0; d2 = jd.djm1;
20224 as1 = d1;
20225 as2 = d2 - 1.0 + datd;
20226
20227 /* Is the TAI after this point? */
20228 da = a1 - as1;
20229 da = da + ( a2 - as2 );
20230 if ( da > 0 ) {
20231
20232 /* Yes: fraction of the current UTC day that has elapsed. */
20233 fd = da * DAYSEC / ( DAYSEC + ddats );
20234
20235 /* Ramp TAI-UTC to bring about SOFA's JD(UTC) convention. */
20236 datd += ddats * ( fd <= 1.0 ? fd : 1.0 ) / DAYSEC;
20237 }
20238
20239 /* Done. */
20240 break;
20241 }
20242 dats1 = dats2;
20243 }
20244
20245 /* Subtract the (possibly adjusted) TAI-UTC from TAI to give UTC. */
20246 a2 -= datd;
20247
20248 /* Return the UTC result, preserving the TAI order. */
20249 if ( big1 ) {
20250 utc1 = a1;
20251 utc2 = a2;
20252 } else {
20253 utc1 = a2;
20254 utc2 = a1;
20255 }
20256
20257 /* TODO Status */
20258 return new JulianDate(utc1, utc2);
20259
20260 };
20261
20262 /**
20263 *
20264 * Time scale transformation: Barycentric Coordinate Time, TCB, to
20265 * Barycentric Dynamical Time, TDB.
20266 *
20267 * <p>This function is derived from the International Astronomical Union's
20268 * SOFA (Standards of Fundamental Astronomy) software collection.
20269 *
20270 *<p>Status: canonical.
20271 *
20272 *<!-- Given: -->
20273 * @param tcb1 double TCB as a 2-part Julian Date
20274 * @param tcb2 double TCB as a 2-part Julian Date
20275 *
20276 *<!-- Returned:-->
20277 * @return TDB as a 2-part Julian Date
20278 *
20279 *
20280 *<p>Notes:
20281 * <ol>
20282 * <li> tcb1+tcb2 is Julian Date, apportioned in any convenient way
20283 * between the two arguments, for example where tcb1 is the Julian
20284 * Day Number and tcb2 is the fraction of a day. The returned
20285 * tdb1,tdb2 follow suit.
20286 *
20287 * <li> The 2006 IAU General Assembly introduced a conventional linear
20288 * transformation between TDB and TCB. This transformation
20289 * compensates for the drift between TCB and terrestrial time TT,
20290 * and keeps TDB approximately centered on TT. Because the
20291 * relationship between TT and TCB depends on the adopted solar
20292 * system ephemeris, the degree of alignment between TDB and TT over
20293 * long intervals will vary according to which ephemeris is used.
20294 * Former definitions of TDB attempted to avoid this problem by
20295 * stipulating that TDB and TT should differ only by periodic
20296 * effects. This is a good description of the nature of the
20297 * relationship but eluded precise mathematical formulation. The
20298 * conventional linear relationship adopted in 2006 sidestepped
20299 * these difficulties whilst delivering a TDB that in practice was
20300 * consistent with values before that date.
20301 *
20302 * <li> TDB is essentially the same as Teph, the time argument for the
20303 * JPL solar system ephemerides.
20304 * </ol>
20305 * Reference:
20306 *
20307 * IAU 2006 Resolution B3
20308 *
20309 *@version 2010 May 16
20310 *
20311 *@since SOFA release 2010-12-01
20312 *
20313 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
20314 */
20315 public static JulianDate jauTcbtdb(double tcb1, double tcb2)
20316 {
20317 double tdb1, tdb2;
20318 /* 1977 Jan 1 00:00:32.184 TT, as two-part JD */
20319 final double t77td = DJM0 + DJM77;
20320 final double t77tf = TTMTAI/DAYSEC;
20321
20322 /* TDB (days) at TAI 1977 Jan 1.0 */
20323 final double tdb0 = TDB0/86400.0;
20324
20325 double d;
20326
20327
20328 /* Result, safeguarding precision. */
20329 if ( abs(tcb1) > abs(tcb2) ) {
20330 d = tcb1 - t77td;
20331 tdb1 = tcb1;
20332 tdb2 = tcb2 + tdb0 - ( d + ( tcb2 - t77tf ) ) * ELB;
20333 } else {
20334 d = tcb2 - t77td;
20335 tdb1 = tcb1 + tdb0 - ( d + ( tcb1 - t77tf ) ) * ELB;
20336 tdb2 = tcb2;
20337 }
20338
20339
20340 return new JulianDate(tdb1, tdb2);
20341
20342 };
20343
20344 /**
20345 * Time scale transformation: Geocentric Coordinate Time, TCG, to
20346 * Terrestrial Time, TT.
20347 *
20348 * <p>This function is derived from the International Astronomical Union's
20349 * SOFA (Standards of Fundamental Astronomy) software collection.
20350 *
20351 *<p>Status: canonical.
20352 *
20353 *<!-- Given: -->
20354 * @param tcg1 double TCG as a 2-part Julian Date
20355 * @param tcg2 double TCG as a 2-part Julian Date
20356 *
20357 *<!-- Returned:-->
20358 * @return TT as a 2-part Julian Date
20359 *
20360 *
20361 * Note:
20362 *
20363 * tcg1+tcg2 is Julian Date, apportioned in any convenient way
20364 * between the two arguments, for example where tcg1 is the Julian
20365 * Day Number and tcg22 is the fraction of a day. The returned
20366 * tt1,tt2 follow suit.
20367 *
20368 *<p>References:
20369 *
20370 * McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),.
20371 * IERS Technical Note No. 32, BKG (2004)
20372 *
20373 * IAU 2000 Resolution B1.9
20374 *
20375 *@version 2010 May 14
20376 *
20377 *@since SOFA release 2010-12-01
20378 *
20379 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
20380 */
20381 public static JulianDate jauTcgtt(double tcg1, double tcg2)
20382 {
20383 double tt1,tt2;
20384 /* 1977 Jan 1 00:00:32.184 TT, as MJD */
20385 final double t77t = DJM77 + TTMTAI/DAYSEC;
20386
20387
20388 /* Result, safeguarding precision. */
20389 if ( abs(tcg1) > abs(tcg2) ) {
20390 tt1 = tcg1;
20391 tt2 = tcg2 - ( ( tcg1 - DJM0 ) + ( tcg2 - t77t ) ) * ELG;
20392 } else {
20393 tt1 = tcg1 - ( ( tcg2 - DJM0 ) + ( tcg1 - t77t ) ) * ELG;
20394 tt2 = tcg2;
20395 }
20396
20397 return new JulianDate(tt1, tt2);
20398 };
20399
20400
20401 /**
20402 *
20403 * Time scale transformation: Barycentric Dynamical Time, TDB, to
20404 * Barycentric Coordinate Time, TCB.
20405 *
20406 * <p>This function is derived from the International Astronomical Union's
20407 * SOFA (Standards of Fundamental Astronomy) software collection.
20408 *
20409 *<p>Status: canonical.
20410 *
20411 *<!-- Given: -->
20412 * @param tdb1 TDB as a 2-part Julian Date
20413 * @param tdb2 TDB as a 2-part Julian Date
20414 *
20415 *<!-- Returned:-->
20416 * @return TCB as a 2-part Julian Date
20417 *
20418 *<p>Notes:
20419 * <ol>
20420 * <li> tdb1+tdb2 is Julian Date, apportioned in any convenient way
20421 * between the two arguments, for example where tdb1 is the Julian
20422 * Day Number and tdb2 is the fraction of a day. The returned
20423 * tcb1,tcb2 follow suit.
20424 *
20425 * <li> The 2006 IAU General Assembly introduced a conventional linear
20426 * transformation between TDB and TCB. This transformation
20427 * compensates for the drift between TCB and terrestrial time TT,
20428 * and keeps TDB approximately centered on TT. Because the
20429 * relationship between TT and TCB depends on the adopted solar
20430 * system ephemeris, the degree of alignment between TDB and TT over
20431 * long intervals will vary according to which ephemeris is used.
20432 * Former definitions of TDB attempted to avoid this problem by
20433 * stipulating that TDB and TT should differ only by periodic
20434 * effects. This is a good description of the nature of the
20435 * relationship but eluded precise mathematical formulation. The
20436 * conventional linear relationship adopted in 2006 sidestepped
20437 * these difficulties whilst delivering a TDB that in practice was
20438 * consistent with values before that date.
20439 *
20440 * <li> TDB is essentially the same as Teph, the time argument for the
20441 * JPL solar system ephemerides.
20442 * </ol>
20443 * Reference:
20444 *
20445 * IAU 2006 Resolution B3
20446 *
20447 *@version 2010 September 10
20448 *
20449 *@since SOFA release 2010-12-01
20450 *
20451 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
20452 */
20453 public static JulianDate jauTdbtcb(double tdb1, double tdb2 )
20454 {
20455 double tcb1, tcb2;
20456 /* 1977 Jan 1 00:00:32.184 TT, as two-part JD */
20457 final double t77td = DJM0 + DJM77;
20458 final double t77tf = TTMTAI/DAYSEC;
20459
20460 /* TDB (days) at TAI 1977 Jan 1.0 */
20461 final double tdb0 = TDB0/DAYSEC;
20462
20463 /* TDB to TCB rate */
20464 final double elbb = ELB/(1.0-ELB);
20465
20466 double d, f;
20467
20468
20469 /* Result, preserving date format but safeguarding precision. */
20470 if ( abs(tdb1) > abs(tdb2) ) {
20471 d = t77td - tdb1;
20472 f = tdb2 - tdb0;
20473 tcb1 = tdb1;
20474 tcb2 = f - ( d - ( f - t77tf ) ) * elbb;
20475 } else {
20476 d = t77td - tdb2;
20477 f = tdb1 - tdb0;
20478 tcb1 = f - ( d - ( f - t77tf ) ) * elbb;
20479 tcb2 = tdb2;
20480 }
20481
20482 return new JulianDate(tcb1, tcb2);
20483
20484 };
20485
20486
20487 /**
20488 *
20489 * Time scale transformation: Barycentric Dynamical Time, TDB, to
20490 * Terrestrial Time, TT.
20491 *
20492 * <p>This function is derived from the International Astronomical Union's
20493 * SOFA (Standards of Fundamental Astronomy) software collection.
20494 *
20495 *<p>Status: canonical.
20496 *
20497 *<!-- Given: -->
20498 * @param tdb1 double TDB as a 2-part Julian Date
20499 * @param tdb2 double TDB as a 2-part Julian Date
20500 * @param dtr double TDB-TT in seconds
20501 *
20502 *<!-- Returned:-->
20503 * @return TT as a 2-part Julian Date
20504 *
20505 *
20506 *<p>Notes:
20507 * <ol>
20508 * <li> tdb1+tdb2 is Julian Date, apportioned in any convenient way
20509 * between the two arguments, for example where tdb1 is the Julian
20510 * Day Number and tdb2 is the fraction of a day. The returned
20511 * tt1,tt2 follow suit.
20512 *
20513 * <li> The argument dtr represents the quasi-periodic component of the
20514 * GR transformation between TT and TCB. It is dependent upon the
20515 * adopted solar-system ephemeris, and can be obtained by numerical
20516 * integration, by interrogating a precomputed time ephemeris or by
20517 * evaluating a model such as that implemented in the SOFA function
20518 * jauDtdb. The quantity is dominated by an annual term of 1.7 ms
20519 * amplitude.
20520 *
20521 * <li> TDB is essentially the same as Teph, the time argument for the
20522 * JPL solar system ephemerides.
20523 * </ol>
20524 *<p>References:
20525 *
20526 * McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
20527 * IERS Technical Note No. 32, BKG (2004)
20528 *
20529 * IAU 2006 Resolution 3
20530 *
20531 *@version 2010 May 13
20532 *
20533 *@since SOFA release 2010-12-01
20534 *
20535 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
20536 *
20537 */
20538 public static JulianDate jauTdbtt(double tdb1, double tdb2, double dtr )
20539 {
20540 double tt1, tt2;
20541 double dtrd;
20542
20543
20544 /* Result, safeguarding precision. */
20545 dtrd = dtr / DAYSEC;
20546 if ( abs(tdb1) > abs(tdb2) ) {
20547 tt1 = tdb1;
20548 tt2 = tdb2 - dtrd;
20549 } else {
20550 tt1 = tdb1 - dtrd;
20551 tt2 = tdb2;
20552 }
20553
20554 return new JulianDate(tt1, tt2);
20555
20556 }
20557
20558 /**
20559 *
20560 * Convert hours, minutes, seconds to radians.
20561 *
20562 * <p>This function is derived from the International Astronomical Union's
20563 * SOFA (Standards of Fundamental Astronomy) software collection.
20564 *
20565 *<p>Status: support function.
20566 *
20567 *<!-- Given: -->
20568 * @param s char sign: '-' = negative, otherwise positive
20569 * @param ihour int hours
20570 * @param imin int minutes
20571 * @param sec double seconds
20572 *
20573 *<!-- Returned:-->
20574 * @return double angle in radians
20575 *@throws JSOFAIllegalParameter illegal parameter of some form
20576 * Returned (function value):
20577 * int status: 0 = OK
20578 * 1 = ihour outside range 0-23
20579 * 2 = imin outside range 0-59
20580 * 3 = sec outside range 0-59.999...
20581 *
20582 *<p>Notes:
20583 *<ul>
20584 * <li> The result is computed even if any of the range checks fail.
20585 *
20586 * <li> Negative ihour, imin and/or sec produce a warning status, but
20587 * the absolute value is used in the conversion.
20588 *</ul>
20589 *@version 2010 August 27
20590 *
20591 *@since SOFA release 2010-12-01
20592 *
20593 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
20594 *
20595 */
20596 public static double jauTf2a(char s, int ihour, int imin, double sec ) throws JSOFAIllegalParameter
20597 {
20598 double rad;
20599
20600 /* Compute the interval. */
20601 rad = ( s == '-' ? -1.0 : 1.0 ) *
20602 ( 60.0 * ( 60.0 * ( (double) abs(ihour) ) +
20603 ( (double) abs(imin) ) ) +
20604 abs(sec) ) * DS2R;
20605
20606 /* Validate arguments and return status. */
20607 if ( ihour < 0 || ihour > 23 ) throw new JSOFAIllegalParameter("bad hour", 1);
20608 if ( imin < 0 || imin > 59 ) throw new JSOFAIllegalParameter("bad minute", 2);
20609 if ( sec < 0.0 || sec >= 60.0 )throw new JSOFAIllegalParameter("bad second", 3);
20610 return rad;
20611
20612 };
20613
20614 /**
20615 *
20616 * Convert hours, minutes, seconds to days.
20617 *
20618 * <p>This function is derived from the International Astronomical Union's
20619 * SOFA (Standards of Fundamental Astronomy) software collection.
20620 *
20621 *<p>Status: support function.
20622 *
20623 *<!-- Given: -->
20624 * @param s char sign: '-' = negative, otherwise positive
20625 * @param ihour int hours
20626 * @param imin int minutes
20627 * @param sec double seconds
20628 *
20629 *<!-- Returned:-->
20630 * @return double interval in days
20631 *
20632 * Returned (function value):
20633 * int status: 0 = OK
20634 * 1 = ihour outside range 0-23
20635 * 2 = imin outside range 0-59
20636 * 3 = sec outside range 0-59.999...
20637 *
20638 *<p>Notes:
20639 *<ol>
20640 * <li> The result is computed even if any of the range checks fail.
20641 *
20642 * <li> Negative ihour, imin and/or sec produce a warning status, but
20643 * the absolute value is used in the conversion.
20644 *</ol>
20645 *@version 2010 August 27
20646 *
20647 *@since SOFA release 2010-12-01
20648 *
20649 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
20650 * @throws JSOFAIllegalParameter
20651 */
20652 public static double jauTf2d(char s, int ihour, int imin, double sec) throws JSOFAIllegalParameter
20653 {
20654 double days;
20655 /* Compute the interval. */
20656 days = ( s == '-' ? -1.0 : 1.0 ) *
20657 ( 60.0 * ( 60.0 * ( (double) abs(ihour) ) +
20658 ( (double) abs(imin) ) ) +
20659 abs(sec) ) / DAYSEC;
20660
20661 /* Validate arguments and return status. */
20662 if ( ihour < 0 || ihour > 23 ) throw new JSOFAIllegalParameter("bad hour", 1);
20663 if ( imin < 0 || imin > 59 ) throw new JSOFAIllegalParameter("bad minute", 2);
20664 if ( sec < 0.0 || sec >= 60.0 ) throw new JSOFAIllegalParameter("bad second", 3);
20665 return days;
20666
20667 }
20668
20669 /**
20670 * Transpose an r-matrix.
20671 *
20672 *<p>This function is derived from the International Astronomical Union's
20673 * SOFA (Standards Of Fundamental Astronomy) software collection.
20674 *
20675 *<p>Status: vector/matrix support function.
20676 *
20677 *<!-- Given: -->
20678 * @param r double[3][3] r-matrix
20679 *
20680 *<!-- Returned: -->
20681 * @return rt double[3][3] <u>returned</u> transpose
20682 *
20683 * Note:
20684 * It is permissible for r and rt to be the same array.
20685 *
20686 *<p>Called:<ul>
20687 * <li>{@link #jauCr} copy r-matrix
20688 * </ul>
20689 *@version 2008 May 22
20690 *
20691 * @since Release 20101201
20692 *
20693 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
20694 */
20695 public static double[][] jauTr(double r[][])
20696 {
20697 double wm[][]= new double[3][3];
20698 int i, j;
20699
20700
20701 for (i = 0; i < 3; i++) {
20702 for (j = 0; j < 3; j++) {
20703 wm[i][j] = r[j][i];
20704 }
20705 }
20706
20707
20708 return wm;
20709
20710 }
20711
20712
20713 /**
20714 * Multiply a p-vector by the transpose of an r-matrix.
20715 *
20716 *<p>This function is derived from the International Astronomical Union's
20717 * SOFA (Standards Of Fundamental Astronomy) software collection.
20718 *
20719 *<p>Status: vector/matrix support function.
20720 *
20721 *<!-- Given: -->
20722 * @param r double[3][3] r-matrix
20723 * @param p double[3] p-vector
20724 *
20725 *<!-- Returned: -->
20726 * @return trp double[3] <u>returned</u> r * p
20727 *
20728 * Note:
20729 * It is permissible for p and trp to be the same array.
20730 *
20731 *<p>Called:<ul>
20732 * <li>{@link #jauTr} transpose r-matrix
20733 * <li>{@link #jauRxp} product of r-matrix and p-vector
20734 * </ul>
20735 *@version 2008 October 28
20736 *
20737 * @since Release 20101201
20738 *
20739 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
20740 */
20741 public static double[] jauTrxp(double r[][], double p[] )
20742 {
20743 double tr[][];
20744 double trp[];
20745
20746 /* Transpose of matrix r. */
20747 tr = jauTr(r);
20748
20749 /* Matrix tr * vector p -> vector trp. */
20750 trp = jauRxp(tr, p);
20751
20752 return trp;
20753
20754 }
20755
20756
20757 /**
20758 * Multiply a pv-vector by the transpose of an r-matrix.
20759 *
20760 *<p>This function is derived from the International Astronomical Union's
20761 * SOFA (Standards Of Fundamental Astronomy) software collection.
20762 *
20763 *<p>Status: vector/matrix support function.
20764 *
20765 *<!-- Given: -->
20766 * @param r double[3][3] r-matrix
20767 * @param pv double[2][3] pv-vector
20768 *
20769 *<!-- Returned: -->
20770 * @return trpv double[2][3] <u>returned</u> r * pv
20771 *
20772 * Note:
20773 * It is permissible for pv and trpv to be the same array.
20774 *
20775 *<p>Called:<ul>
20776 * <li>{@link #jauTr} transpose r-matrix
20777 * <li>{@link #jauRxpv} product of r-matrix and pv-vector
20778 * </ul>
20779 *@version 2008 October 28
20780 *
20781 * @since Release 20101201
20782 *
20783 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
20784 */
20785 public static double[][] jauTrxpv(double r[][], double pv[][] )
20786 {
20787 double tr[][], trpv[][];
20788
20789
20790 /* Transpose of matrix r. */
20791 tr = jauTr(r);
20792
20793 /* Matrix tr * vector pv -> vector trpv. */
20794 trpv = jauRxpv(tr, pv);
20795
20796 return trpv;
20797
20798 }
20799
20800 /*
20801 * constant arrays set outside jauXy06 to avoid problems with 65535 byte limit on function size
20802 */
20803 static {
20804 /* need to define this function because it appears that javac lumps all of the statically defined initalizers into one function on
20805 * compilation - so this will force a second function */
20806 init_mfals();
20807 }
20808 /** Fundamental-argument multipliers: luni-solar terms */
20809 private static int mfals[][]; //IMPL would like to be final really
20810
20811 private static void init_mfals(){
20812
20813 mfals = new int[][]
20814 {
20815
20816 /* 1-10 */
20817 { 0, 0, 0, 0, 1 },
20818 { 0, 0, 2, -2, 2 },
20819 { 0, 0, 2, 0, 2 },
20820 { 0, 0, 0, 0, 2 },
20821 { 0, 1, 0, 0, 0 },
20822 { 0, 1, 2, -2, 2 },
20823 { 1, 0, 0, 0, 0 },
20824 { 0, 0, 2, 0, 1 },
20825 { 1, 0, 2, 0, 2 },
20826 { 0, 1, -2, 2, -2 },
20827
20828 /* 11-20 */
20829 { 0, 0, 2, -2, 1 },
20830 { 1, 0, -2, 0, -2 },
20831 { 1, 0, 0, -2, 0 },
20832 { 1, 0, 0, 0, 1 },
20833 { 1, 0, 0, 0, -1 },
20834 { 1, 0, -2, -2, -2 },
20835 { 1, 0, 2, 0, 1 },
20836 { 2, 0, -2, 0, -1 },
20837 { 0, 0, 0, 2, 0 },
20838 { 0, 0, 2, 2, 2 },
20839
20840 /* 21-30 */
20841 { 2, 0, 0, -2, 0 },
20842 { 0, 2, -2, 2, -2 },
20843 { 2, 0, 2, 0, 2 },
20844 { 1, 0, 2, -2, 2 },
20845 { 1, 0, -2, 0, -1 },
20846 { 2, 0, 0, 0, 0 },
20847 { 0, 0, 2, 0, 0 },
20848 { 0, 1, 0, 0, 1 },
20849 { 1, 0, 0, -2, -1 },
20850 { 0, 2, 2, -2, 2 },
20851
20852 /* 31-40 */
20853 { 0, 0, 2, -2, 0 },
20854 { 1, 0, 0, -2, 1 },
20855 { 0, 1, 0, 0, -1 },
20856 { 0, 2, 0, 0, 0 },
20857 { 1, 0, -2, -2, -1 },
20858 { 1, 0, 2, 2, 2 },
20859 { 0, 1, 2, 0, 2 },
20860 { 2, 0, -2, 0, 0 },
20861 { 0, 0, 2, 2, 1 },
20862 { 0, 1, -2, 0, -2 },
20863
20864 /* 41-50 */
20865 { 0, 0, 0, 2, 1 },
20866 { 1, 0, 2, -2, 1 },
20867 { 2, 0, 0, -2, -1 },
20868 { 2, 0, 2, -2, 2 },
20869 { 2, 0, 2, 0, 1 },
20870 { 0, 0, 0, 2, -1 },
20871 { 0, 1, -2, 2, -1 },
20872 { 1, 1, 0, -2, 0 },
20873 { 2, 0, 0, -2, 1 },
20874 { 1, 0, 0, 2, 0 },
20875
20876 /* 51-60 */
20877 { 0, 1, 2, -2, 1 },
20878 { 1, -1, 0, 0, 0 },
20879 { 0, 1, -1, 1, -1 },
20880 { 2, 0, -2, 0, -2 },
20881 { 0, 1, 0, -2, 0 },
20882 { 1, 0, 0, -1, 0 },
20883 { 3, 0, 2, 0, 2 },
20884 { 0, 0, 0, 1, 0 },
20885 { 1, -1, 2, 0, 2 },
20886 { 1, 1, -2, -2, -2 },
20887
20888 /* 61-70 */
20889 { 1, 0, -2, 0, 0 },
20890 { 2, 0, 0, 0, -1 },
20891 { 0, 1, -2, -2, -2 },
20892 { 1, 1, 2, 0, 2 },
20893 { 2, 0, 0, 0, 1 },
20894 { 1, 1, 0, 0, 0 },
20895 { 1, 0, -2, 2, -1 },
20896 { 1, 0, 2, 0, 0 },
20897 { 1, -1, 0, -1, 0 },
20898 { 1, 0, 0, 0, 2 },
20899
20900 /* 71-80 */
20901 { 1, 0, -1, 0, -1 },
20902 { 0, 0, 2, 1, 2 },
20903 { 1, 0, -2, -4, -2 },
20904 { 1, -1, 0, -1, -1 },
20905 { 1, 0, 2, 2, 1 },
20906 { 0, 2, -2, 2, -1 },
20907 { 1, 0, 0, 0, -2 },
20908 { 2, 0, -2, -2, -2 },
20909 { 1, 1, 2, -2, 2 },
20910 { 2, 0, -2, -4, -2 },
20911
20912 /* 81-90 */
20913 { 1, 0, -4, 0, -2 },
20914 { 2, 0, 2, -2, 1 },
20915 { 1, 0, 0, -1, -1 },
20916 { 2, 0, 2, 2, 2 },
20917 { 3, 0, 0, 0, 0 },
20918 { 1, 0, 0, 2, 1 },
20919 { 0, 0, 2, -2, -1 },
20920 { 3, 0, 2, -2, 2 },
20921 { 0, 0, 4, -2, 2 },
20922 { 1, 0, 0, -4, 0 },
20923
20924 /* 91-100 */
20925 { 0, 1, 2, 0, 1 },
20926 { 2, 0, 0, -4, 0 },
20927 { 1, 1, 0, -2, -1 },
20928 { 2, 0, -2, 0, 1 },
20929 { 0, 0, 2, 0, -1 },
20930 { 0, 1, -2, 0, -1 },
20931 { 0, 1, 0, 0, 2 },
20932 { 0, 0, 2, -1, 2 },
20933 { 0, 0, 2, 4, 2 },
20934 { 2, 1, 0, -2, 0 },
20935
20936 /* 101-110 */
20937 { 1, 1, 0, -2, 1 },
20938 { 1, -1, 0, -2, 0 },
20939 { 1, -1, 0, -1, -2 },
20940 { 1, -1, 0, 0, 1 },
20941 { 0, 1, -2, 2, 0 },
20942 { 0, 1, 0, 0, -2 },
20943 { 1, -1, 2, 2, 2 },
20944 { 1, 0, 0, 2, -1 },
20945 { 1, -1, -2, -2, -2 },
20946 { 3, 0, 2, 0, 1 },
20947
20948 /* 111-120 */
20949 { 0, 1, 2, 2, 2 },
20950 { 1, 0, 2, -2, 0 },
20951 { 1, 1, -2, -2, -1 },
20952 { 1, 0, 2, -4, 1 },
20953 { 0, 1, -2, -2, -1 },
20954 { 2, -1, 2, 0, 2 },
20955 { 0, 0, 0, 2, 2 },
20956 { 1, -1, 2, 0, 1 },
20957 { 1, -1, -2, 0, -2 },
20958 { 0, 1, 0, 2, 0 },
20959
20960 /* 121-130 */
20961 { 0, 1, 2, -2, 0 },
20962 { 0, 0, 0, 1, 1 },
20963 { 1, 0, -2, -2, 0 },
20964 { 0, 3, 2, -2, 2 },
20965 { 2, 1, 2, 0, 2 },
20966 { 1, 1, 0, 0, 1 },
20967 { 2, 0, 0, 2, 0 },
20968 { 1, 1, 2, 0, 1 },
20969 { 1, 0, 0, -2, -2 },
20970 { 1, 0, -2, 2, 0 },
20971
20972 /* 131-140 */
20973 { 1, 0, -1, 0, -2 },
20974 { 0, 1, 0, -2, 1 },
20975 { 0, 1, 0, 1, 0 },
20976 { 0, 0, 0, 1, -1 },
20977 { 1, 0, -2, 2, -2 },
20978 { 1, -1, 0, 0, -1 },
20979 { 0, 0, 0, 4, 0 },
20980 { 1, -1, 0, 2, 0 },
20981 { 1, 0, 2, 1, 2 },
20982 { 1, 0, 2, -1, 2 },
20983
20984 /* 141-150 */
20985 { 0, 0, 2, 1, 1 },
20986 { 1, 0, 0, -2, 2 },
20987 { 1, 0, -2, 0, 1 },
20988 { 1, 0, -2, -4, -1 },
20989 { 0, 0, 2, 2, 0 },
20990 { 1, 1, 2, -2, 1 },
20991 { 1, 0, -2, 1, -1 },
20992 { 0, 0, 1, 0, 1 },
20993 { 2, 0, -2, -2, -1 },
20994 { 4, 0, 2, 0, 2 },
20995
20996 /* 151-160 */
20997 { 2, -1, 0, 0, 0 },
20998 { 2, 1, 2, -2, 2 },
20999 { 0, 1, 2, 1, 2 },
21000 { 1, 0, 4, -2, 2 },
21001 { 1, 1, 0, 0, -1 },
21002 { 2, 0, 2, 0, 0 },
21003 { 2, 0, -2, -4, -1 },
21004 { 1, 0, -1, 0, 0 },
21005 { 1, 0, 0, 1, 0 },
21006 { 0, 1, 0, 2, 1 },
21007
21008 /* 161-170 */
21009 { 1, 0, -4, 0, -1 },
21010 { 1, 0, 0, -4, -1 },
21011 { 2, 0, 2, 2, 1 },
21012 { 2, 1, 0, 0, 0 },
21013 { 0, 0, 2, -3, 2 },
21014 { 1, 2, 0, -2, 0 },
21015 { 0, 3, 0, 0, 0 },
21016 { 0, 0, 4, 0, 2 },
21017 { 0, 0, 2, -4, 1 },
21018 { 2, 0, 0, -2, -2 },
21019
21020 /* 171-180 */
21021 { 1, 1, -2, -4, -2 },
21022 { 0, 1, 0, -2, -1 },
21023 { 0, 0, 0, 4, 1 },
21024 { 3, 0, 2, -2, 1 },
21025 { 1, 0, 2, 4, 2 },
21026 { 1, 1, -2, 0, -2 },
21027 { 0, 0, 4, -2, 1 },
21028 { 2, -2, 0, -2, 0 },
21029 { 2, 1, 0, -2, -1 },
21030 { 0, 2, 0, -2, 0 },
21031
21032 /* 181-190 */
21033 { 1, 0, 0, -1, 1 },
21034 { 1, 1, 2, 2, 2 },
21035 { 3, 0, 0, 0, -1 },
21036 { 2, 0, 0, -4, -1 },
21037 { 3, 0, 2, 2, 2 },
21038 { 0, 0, 2, 4, 1 },
21039 { 0, 2, -2, -2, -2 },
21040 { 1, -1, 0, -2, -1 },
21041 { 0, 0, 2, -1, 1 },
21042 { 2, 0, 0, 2, 1 },
21043
21044 /* 191-200 */
21045 { 1, -1, -2, 2, -1 },
21046 { 0, 0, 0, 2, -2 },
21047 { 2, 0, 0, -4, 1 },
21048 { 1, 0, 0, -4, 1 },
21049 { 2, 0, 2, -4, 1 },
21050 { 4, 0, 2, -2, 2 },
21051 { 2, 1, -2, 0, -1 },
21052 { 2, 1, -2, -4, -2 },
21053 { 3, 0, 0, -4, 0 },
21054 { 1, -1, 2, 2, 1 },
21055
21056 /* 201-210 */
21057 { 1, -1, -2, 0, -1 },
21058 { 0, 2, 0, 0, 1 },
21059 { 1, 2, -2, -2, -2 },
21060 { 1, 1, 0, -4, 0 },
21061 { 2, 0, 0, -2, 2 },
21062 { 0, 2, 2, -2, 1 },
21063 { 1, 0, 2, 0, -1 },
21064 { 2, 1, 0, -2, 1 },
21065 { 2, -1, -2, 0, -1 },
21066 { 1, -1, -2, -2, -1 },
21067
21068 /* 211-220 */
21069 { 0, 1, -2, 1, -2 },
21070 { 1, 0, -4, 2, -2 },
21071 { 0, 1, 2, 2, 1 },
21072 { 3, 0, 0, 0, 1 },
21073 { 2, -1, 2, 2, 2 },
21074 { 0, 1, -2, -4, -2 },
21075 { 1, 0, -2, -3, -2 },
21076 { 2, 0, 0, 0, 2 },
21077 { 1, -1, 0, -2, -2 },
21078 { 2, 0, -2, 2, -1 },
21079
21080 /* 221-230 */
21081 { 0, 2, -2, 0, -2 },
21082 { 3, 0, -2, 0, -1 },
21083 { 2, -1, 2, 0, 1 },
21084 { 1, 0, -2, -1, -2 },
21085 { 0, 0, 2, 0, 3 },
21086 { 2, 0, -4, 0, -2 },
21087 { 2, 1, 0, -4, 0 },
21088 { 1, 1, -2, 1, -1 },
21089 { 0, 2, 2, 0, 2 },
21090 { 1, -1, 2, -2, 2 },
21091
21092 /* 231-240 */
21093 { 1, -1, 0, -2, 1 },
21094 { 2, 1, 2, 0, 1 },
21095 { 1, 0, 2, -4, 2 },
21096 { 1, 1, -2, 0, -1 },
21097 { 1, 1, 0, 2, 0 },
21098 { 1, 0, 0, -3, 0 },
21099 { 2, 0, 2, -1, 2 },
21100 { 0, 2, 0, 0, -1 },
21101 { 2, -1, 0, -2, 0 },
21102 { 4, 0, 0, 0, 0 },
21103
21104 /* 241-250 */
21105 { 2, 1, -2, -2, -2 },
21106 { 0, 2, -2, 2, 0 },
21107 { 1, 0, 2, 1, 1 },
21108 { 1, 0, -1, 0, -3 },
21109 { 3, -1, 2, 0, 2 },
21110 { 2, 0, 2, -2, 0 },
21111 { 1, -2, 0, 0, 0 },
21112 { 2, 0, 0, 0, -2 },
21113 { 1, 0, 0, 4, 0 },
21114 { 0, 1, 0, 1, 1 },
21115
21116 /* 251-260 */
21117 { 1, 0, 2, 2, 0 },
21118 { 0, 1, 0, 2, -1 },
21119 { 0, 1, 0, 1, -1 },
21120 { 0, 0, 2, -2, 3 },
21121 { 3, 1, 2, 0, 2 },
21122 { 1, 1, 2, 1, 2 },
21123 { 1, 1, -2, 2, -1 },
21124 { 2, -1, 2, -2, 2 },
21125 { 1, -2, 2, 0, 2 },
21126 { 1, 0, 2, -4, 0 },
21127
21128 /* 261-270 */
21129 { 0, 0, 1, 0, 0 },
21130 { 1, 0, 2, -3, 1 },
21131 { 1, -2, 0, -2, 0 },
21132 { 2, 0, 0, 2, -1 },
21133 { 1, 1, 2, -4, 1 },
21134 { 4, 0, 2, 0, 1 },
21135 { 0, 1, 2, 1, 1 },
21136 { 1, 2, 2, -2, 2 },
21137 { 2, 0, 2, 1, 2 },
21138 { 2, 1, 2, -2, 1 },
21139
21140 /* 271-280 */
21141 { 1, 0, 2, -1, 1 },
21142 { 1, 0, 4, -2, 1 },
21143 { 1, -1, 2, -2, 1 },
21144 { 0, 1, 0, -4, 0 },
21145 { 3, 0, -2, -2, -2 },
21146 { 0, 0, 4, -4, 2 },
21147 { 2, 0, -4, -2, -2 },
21148 { 2, -2, 0, -2, -1 },
21149 { 1, 0, 2, -2, -1 },
21150 { 2, 0, -2, -6, -2 },
21151
21152 /* 281-290 */
21153 { 1, 0, -2, 1, -2 },
21154 { 1, 0, -2, 2, 1 },
21155 { 1, -1, 0, 2, -1 },
21156 { 1, 0, -2, 1, 0 },
21157 { 2, -1, 0, -2, 1 },
21158 { 1, -1, 0, 2, 1 },
21159 { 2, 0, -2, -2, 0 },
21160 { 1, 0, 2, -3, 2 },
21161 { 0, 0, 0, 4, -1 },
21162 { 2, -1, 0, 0, 1 },
21163
21164 /* 291-300 */
21165 { 2, 0, 4, -2, 2 },
21166 { 0, 0, 2, 3, 2 },
21167 { 0, 1, 4, -2, 2 },
21168 { 0, 1, -2, 2, 1 },
21169 { 1, 1, 0, 2, 1 },
21170 { 1, 0, 0, 4, 1 },
21171 { 0, 0, 4, 0, 1 },
21172 { 2, 0, 0, -3, 0 },
21173 { 1, 0, 0, -1, -2 },
21174 { 1, -2, -2, -2, -2 },
21175
21176 /* 301-310 */
21177 { 3, 0, 0, 2, 0 },
21178 { 2, 0, 2, -4, 2 },
21179 { 1, 1, -2, -4, -1 },
21180 { 1, 0, -2, -6, -2 },
21181 { 2, -1, 0, 0, -1 },
21182 { 2, -1, 0, 2, 0 },
21183 { 0, 1, 2, -2, -1 },
21184 { 1, 1, 0, 1, 0 },
21185 { 1, 2, 0, -2, -1 },
21186 { 1, 0, 0, 1, -1 },
21187
21188 /* 311-320 */
21189 { 0, 0, 1, 0, 2 },
21190 { 3, 1, 2, -2, 2 },
21191 { 1, 0, -4, -2, -2 },
21192 { 1, 0, 2, 4, 1 },
21193 { 1, -2, 2, 2, 2 },
21194 { 1, -1, -2, -4, -2 },
21195 { 0, 0, 2, -4, 2 },
21196 { 0, 0, 2, -3, 1 },
21197 { 2, 1, -2, 0, 0 },
21198 { 3, 0, -2, -2, -1 },
21199
21200 /* 321-330 */
21201 { 2, 0, 2, 4, 2 },
21202 { 0, 0, 0, 0, 3 },
21203 { 2, -1, -2, -2, -2 },
21204 { 2, 0, 0, -1, 0 },
21205 { 3, 0, 2, -4, 2 },
21206 { 2, 1, 2, 2, 2 },
21207 { 0, 0, 3, 0, 3 },
21208 { 1, 1, 2, 2, 1 },
21209 { 2, 1, 0, 0, -1 },
21210 { 1, 2, 0, -2, 1 },
21211
21212 /* 331-340 */
21213 { 3, 0, 2, 2, 1 },
21214 { 1, -1, -2, 2, -2 },
21215 { 1, 1, 0, -1, 0 },
21216 { 1, 2, 0, 0, 0 },
21217 { 1, 0, 4, 0, 2 },
21218 { 1, -1, 2, 4, 2 },
21219 { 2, 1, 0, 0, 1 },
21220 { 1, 0, 0, 2, 2 },
21221 { 1, -1, -2, 2, 0 },
21222 { 0, 2, -2, -2, -1 },
21223
21224 /* 341-350 */
21225 { 2, 0, -2, 0, 2 },
21226 { 5, 0, 2, 0, 2 },
21227 { 3, 0, -2, -6, -2 },
21228 { 1, -1, 2, -1, 2 },
21229 { 3, 0, 0, -4, -1 },
21230 { 1, 0, 0, 1, 1 },
21231 { 1, 0, -4, 2, -1 },
21232 { 0, 1, 2, -4, 1 },
21233 { 1, 2, 2, 0, 2 },
21234 { 0, 1, 0, -2, -2 },
21235
21236 /* 351-360 */
21237 { 0, 0, 2, -1, 0 },
21238 { 1, 0, 1, 0, 1 },
21239 { 0, 2, 0, -2, 1 },
21240 { 3, 0, 2, 0, 0 },
21241 { 1, 1, -2, 1, 0 },
21242 { 2, 1, -2, -4, -1 },
21243 { 3, -1, 0, 0, 0 },
21244 { 2, -1, -2, 0, 0 },
21245 { 4, 0, 2, -2, 1 },
21246 { 2, 0, -2, 2, 0 },
21247
21248 /* 361-370 */
21249 { 1, 1, 2, -2, 0 },
21250 { 1, 0, -2, 4, -1 },
21251 { 1, 0, -2, -2, 1 },
21252 { 2, 0, 2, -4, 0 },
21253 { 1, 1, 0, -2, -2 },
21254 { 1, 1, -2, -2, 0 },
21255 { 1, 0, 1, -2, 1 },
21256 { 2, -1, -2, -4, -2 },
21257 { 3, 0, -2, 0, -2 },
21258 { 0, 1, -2, -2, 0 },
21259
21260 /* 371-380 */
21261 { 3, 0, 0, -2, -1 },
21262 { 1, 0, -2, -3, -1 },
21263 { 0, 1, 0, -4, -1 },
21264 { 1, -2, 2, -2, 1 },
21265 { 0, 1, -2, 1, -1 },
21266 { 1, -1, 0, 0, 2 },
21267 { 2, 0, 0, 1, 0 },
21268 { 1, -2, 0, 2, 0 },
21269 { 1, 2, -2, -2, -1 },
21270 { 0, 0, 4, -4, 1 },
21271
21272 /* 381-390 */
21273 { 0, 1, 2, 4, 2 },
21274 { 0, 1, -4, 2, -2 },
21275 { 3, 0, -2, 0, 0 },
21276 { 2, -1, 2, 2, 1 },
21277 { 0, 1, -2, -4, -1 },
21278 { 4, 0, 2, 2, 2 },
21279 { 2, 0, -2, -3, -2 },
21280 { 2, 0, 0, -6, 0 },
21281 { 1, 0, 2, 0, 3 },
21282 { 3, 1, 0, 0, 0 },
21283
21284 /* 391-400 */
21285 { 3, 0, 0, -4, 1 },
21286 { 1, -1, 2, 0, 0 },
21287 { 1, -1, 0, -4, 0 },
21288 { 2, 0, -2, 2, -2 },
21289 { 1, 1, 0, -2, 2 },
21290 { 4, 0, 0, -2, 0 },
21291 { 2, 2, 0, -2, 0 },
21292 { 0, 1, 2, 0, 0 },
21293 { 1, 1, 0, -4, 1 },
21294 { 1, 0, 0, -4, -2 },
21295
21296 /* 401-410 */
21297 { 0, 0, 0, 1, 2 },
21298 { 3, 0, 0, 2, 1 },
21299 { 1, 1, 0, -4, -1 },
21300 { 0, 0, 2, 2, -1 },
21301 { 1, 1, 2, 0, 0 },
21302 { 1, -1, 2, -4, 1 },
21303 { 1, 1, 0, 0, 2 },
21304 { 0, 0, 2, 6, 2 },
21305 { 4, 0, -2, -2, -1 },
21306 { 2, 1, 0, -4, -1 },
21307
21308 /* 411-420 */
21309 { 0, 0, 0, 3, 1 },
21310 { 1, -1, -2, 0, 0 },
21311 { 0, 0, 2, 1, 0 },
21312 { 1, 0, 0, 2, -2 },
21313 { 3, -1, 2, 2, 2 },
21314 { 3, -1, 2, -2, 2 },
21315 { 1, 0, 0, -1, 2 },
21316 { 1, -2, 2, -2, 2 },
21317 { 0, 1, 0, 2, 2 },
21318 { 0, 1, -2, -1, -2 },
21319
21320 /* 421-430 */
21321 { 1, 1, -2, 0, 0 },
21322 { 0, 2, 2, -2, 0 },
21323 { 3, -1, -2, -1, -2 },
21324 { 1, 0, 0, -6, 0 },
21325 { 1, 0, -2, -4, 0 },
21326 { 2, 1, 0, -4, 1 },
21327 { 2, 0, 2, 0, -1 },
21328 { 2, 0, -4, 0, -1 },
21329 { 0, 0, 3, 0, 2 },
21330 { 2, 1, -2, -2, -1 },
21331
21332 /* 431-440 */
21333 { 1, -2, 0, 0, 1 },
21334 { 2, -1, 0, -4, 0 },
21335 { 0, 0, 0, 3, 0 },
21336 { 5, 0, 2, -2, 2 },
21337 { 1, 2, -2, -4, -2 },
21338 { 1, 0, 4, -4, 2 },
21339 { 0, 0, 4, -1, 2 },
21340 { 3, 1, 0, -4, 0 },
21341 { 3, 0, 0, -6, 0 },
21342 { 2, 0, 0, 2, 2 },
21343
21344 /* 441-450 */
21345 { 2, -2, 2, 0, 2 },
21346 { 1, 0, 0, -3, 1 },
21347 { 1, -2, -2, 0, -2 },
21348 { 1, -1, -2, -3, -2 },
21349 { 0, 0, 2, -2, -2 },
21350 { 2, 0, -2, -4, 0 },
21351 { 1, 0, -4, 0, 0 },
21352 { 0, 1, 0, -1, 0 },
21353 { 4, 0, 0, 0, -1 },
21354 { 3, 0, 2, -1, 2 },
21355
21356 /* 451-460 */
21357 { 3, -1, 2, 0, 1 },
21358 { 2, 0, 2, -1, 1 },
21359 { 1, 2, 2, -2, 1 },
21360 { 1, 1, 0, 2, -1 },
21361 { 0, 2, 2, 0, 1 },
21362 { 3, 1, 2, 0, 1 },
21363 { 1, 1, 2, 1, 1 },
21364 { 1, 1, 0, -1, 1 },
21365 { 1, -2, 0, -2, -1 },
21366 { 4, 0, 0, -4, 0 },
21367
21368 /* 461-470 */
21369 { 2, 1, 0, 2, 0 },
21370 { 1, -1, 0, 4, 0 },
21371 { 0, 1, 0, -2, 2 },
21372 { 0, 0, 2, 0, -2 },
21373 { 1, 0, -1, 0, 1 },
21374 { 3, 0, 2, -2, 0 },
21375 { 2, 0, 2, 2, 0 },
21376 { 1, 2, 0, -4, 0 },
21377 { 1, -1, 0, -3, 0 },
21378 { 0, 1, 0, 4, 0 },
21379
21380 /* 471 - 480 */
21381 { 0, 1, -2, 0, 0 },
21382 { 2, 2, 2, -2, 2 },
21383 { 0, 0, 0, 1, -2 },
21384 { 0, 2, -2, 0, -1 },
21385 { 4, 0, 2, -4, 2 },
21386 { 2, 0, -4, 2, -2 },
21387 { 2, -1, -2, 0, -2 },
21388 { 1, 1, 4, -2, 2 },
21389 { 1, 1, 2, -4, 2 },
21390 { 1, 0, 2, 3, 2 },
21391
21392 /* 481-490 */
21393 { 1, 0, 0, 4, -1 },
21394 { 0, 0, 0, 4, 2 },
21395 { 2, 0, 0, 4, 0 },
21396 { 1, 1, -2, 2, 0 },
21397 { 2, 1, 2, 1, 2 },
21398 { 2, 1, 2, -4, 1 },
21399 { 2, 0, 2, 1, 1 },
21400 { 2, 0, -4, -2, -1 },
21401 { 2, 0, -2, -6, -1 },
21402 { 2, -1, 2, -1, 2 },
21403
21404 /* 491-500 */
21405 { 1, -2, 2, 0, 1 },
21406 { 1, -2, 0, -2, 1 },
21407 { 1, -1, 0, -4, -1 },
21408 { 0, 2, 2, 2, 2 },
21409 { 0, 2, -2, -4, -2 },
21410 { 0, 1, 2, 3, 2 },
21411 { 0, 1, 0, -4, 1 },
21412 { 3, 0, 0, -2, 1 },
21413 { 2, 1, -2, 0, 1 },
21414 { 2, 0, 4, -2, 1 },
21415
21416 /* 501-510 */
21417 { 2, 0, 0, -3, -1 },
21418 { 2, -2, 0, -2, 1 },
21419 { 2, -1, 2, -2, 1 },
21420 { 1, 0, 0, -6, -1 },
21421 { 1, -2, 0, 0, -1 },
21422 { 1, -2, -2, -2, -1 },
21423 { 0, 1, 4, -2, 1 },
21424 { 0, 0, 2, 3, 1 },
21425 { 2, -1, 0, -1, 0 },
21426 { 1, 3, 0, -2, 0 },
21427
21428 /* 511-520 */
21429 { 0, 3, 0, -2, 0 },
21430 { 2, -2, 2, -2, 2 },
21431 { 0, 0, 4, -2, 0 },
21432 { 4, -1, 2, 0, 2 },
21433 { 2, 2, -2, -4, -2 },
21434 { 4, 1, 2, 0, 2 },
21435 { 4, -1, -2, -2, -2 },
21436 { 2, 1, 0, -2, -2 },
21437 { 2, 1, -2, -6, -2 },
21438 { 2, 0, 0, -1, 1 },
21439
21440 /* 521-530 */
21441 { 2, -1, -2, 2, -1 },
21442 { 1, 1, -2, 2, -2 },
21443 { 1, 1, -2, -3, -2 },
21444 { 1, 0, 3, 0, 3 },
21445 { 1, 0, -2, 1, 1 },
21446 { 1, 0, -2, 0, 2 },
21447 { 1, -1, 2, 1, 2 },
21448 { 1, -1, 0, 0, -2 },
21449 { 1, -1, -4, 2, -2 },
21450 { 0, 3, -2, -2, -2 },
21451
21452 /* 531-540 */
21453 { 0, 1, 0, 4, 1 },
21454 { 0, 0, 4, 2, 2 },
21455 { 3, 0, -2, -2, 0 },
21456 { 2, -2, 0, 0, 0 },
21457 { 1, 1, 2, -4, 0 },
21458 { 1, 1, 0, -3, 0 },
21459 { 1, 0, 2, -3, 0 },
21460 { 1, -1, 2, -2, 0 },
21461 { 0, 2, 0, 2, 0 },
21462 { 0, 0, 2, 4, 0 },
21463
21464 /* 541-550 */
21465 { 1, 0, 1, 0, 0 },
21466 { 3, 1, 2, -2, 1 },
21467 { 3, 0, 4, -2, 2 },
21468 { 3, 0, 2, 1, 2 },
21469 { 3, 0, 0, 2, -1 },
21470 { 3, 0, 0, 0, 2 },
21471 { 3, 0, -2, 2, -1 },
21472 { 2, 0, 4, -4, 2 },
21473 { 2, 0, 2, -3, 2 },
21474 { 2, 0, 0, 4, 1 },
21475
21476 /* 551-560 */
21477 { 2, 0, 0, -3, 1 },
21478 { 2, 0, -4, 2, -1 },
21479 { 2, 0, -2, -2, 1 },
21480 { 2, -2, 2, 2, 2 },
21481 { 2, -2, 0, -2, -2 },
21482 { 2, -1, 0, 2, 1 },
21483 { 2, -1, 0, 2, -1 },
21484 { 1, 1, 2, 4, 2 },
21485 { 1, 1, 0, 1, 1 },
21486 { 1, 1, 0, 1, -1 },
21487
21488 /* 561-570 */
21489 { 1, 1, -2, -6, -2 },
21490 { 1, 0, 0, -3, -1 },
21491 { 1, 0, -4, -2, -1 },
21492 { 1, 0, -2, -6, -1 },
21493 { 1, -2, 2, 2, 1 },
21494 { 1, -2, -2, 2, -1 },
21495 { 1, -1, -2, -4, -1 },
21496 { 0, 2, 0, 0, 2 },
21497 { 0, 1, 2, -4, 2 },
21498 { 0, 1, -2, 4, -1 },
21499
21500 /* 571-580 */
21501 { 5, 0, 0, 0, 0 },
21502 { 3, 0, 0, -3, 0 },
21503 { 2, 2, 0, -4, 0 },
21504 { 1, -1, 2, 2, 0 },
21505 { 0, 1, 0, 3, 0 },
21506 { 4, 0, -2, 0, -1 },
21507 { 3, 0, -2, -6, -1 },
21508 { 3, 0, -2, -1, -1 },
21509 { 2, 1, 2, 2, 1 },
21510 { 2, 1, 0, 2, 1 },
21511
21512 /* 581-590 */
21513 { 2, 0, 2, 4, 1 },
21514 { 2, 0, 2, -6, 1 },
21515 { 2, 0, 2, -2, -1 },
21516 { 2, 0, 0, -6, -1 },
21517 { 2, -1, -2, -2, -1 },
21518 { 1, 2, 2, 0, 1 },
21519 { 1, 2, 0, 0, 1 },
21520 { 1, 0, 4, 0, 1 },
21521 { 1, 0, 2, -6, 1 },
21522 { 1, 0, 2, -4, -1 },
21523
21524 /* 591-600 */
21525 { 1, 0, -1, -2, -1 },
21526 { 1, -1, 2, 4, 1 },
21527 { 1, -1, 2, -3, 1 },
21528 { 1, -1, 0, 4, 1 },
21529 { 1, -1, -2, 1, -1 },
21530 { 0, 1, 2, -2, 3 },
21531 { 3, 0, 0, -2, 0 },
21532 { 1, 0, 1, -2, 0 },
21533 { 0, 2, 0, -4, 0 },
21534 { 0, 0, 2, -4, 0 },
21535
21536 /* 601-610 */
21537 { 0, 0, 1, -1, 0 },
21538 { 0, 0, 0, 6, 0 },
21539 { 0, 2, 0, 0, -2 },
21540 { 0, 1, -2, 2, -3 },
21541 { 4, 0, 0, 2, 0 },
21542 { 3, 0, 0, -1, 0 },
21543 { 3, -1, 0, 2, 0 },
21544 { 2, 1, 0, 1, 0 },
21545 { 2, 1, 0, -6, 0 },
21546 { 2, -1, 2, 0, 0 },
21547
21548 /* 611-620 */
21549 { 1, 0, 2, -1, 0 },
21550 { 1, -1, 0, 1, 0 },
21551 { 1, -1, -2, -2, 0 },
21552 { 0, 1, 2, 2, 0 },
21553 { 0, 0, 2, -3, 0 },
21554 { 2, 2, 0, -2, -1 },
21555 { 2, -1, -2, 0, 1 },
21556 { 1, 2, 2, -4, 1 },
21557 { 0, 1, 4, -4, 2 },
21558 { 0, 0, 0, 3, 2 },
21559
21560 /* 621-630 */
21561 { 5, 0, 2, 0, 1 },
21562 { 4, 1, 2, -2, 2 },
21563 { 4, 0, -2, -2, 0 },
21564 { 3, 1, 2, 2, 2 },
21565 { 3, 1, 0, -2, 0 },
21566 { 3, 1, -2, -6, -2 },
21567 { 3, 0, 0, 0, -2 },
21568 { 3, 0, -2, -4, -2 },
21569 { 3, -1, 0, -3, 0 },
21570 { 3, -1, 0, -2, 0 },
21571
21572 /* 631-640 */
21573 { 2, 1, 2, 0, 0 },
21574 { 2, 1, 2, -4, 2 },
21575 { 2, 1, 2, -2, 0 },
21576 { 2, 1, 0, -3, 0 },
21577 { 2, 1, -2, 0, -2 },
21578 { 2, 0, 0, -4, 2 },
21579 { 2, 0, 0, -4, -2 },
21580 { 2, 0, -2, -5, -2 },
21581 { 2, -1, 2, 4, 2 },
21582 { 2, -1, 0, -2, 2 },
21583
21584 /* 641-650 */
21585 { 1, 3, -2, -2, -2 },
21586 { 1, 1, 0, 0, -2 },
21587 { 1, 1, 0, -6, 0 },
21588 { 1, 1, -2, 1, -2 },
21589 { 1, 1, -2, -1, -2 },
21590 { 1, 0, 2, 1, 0 },
21591 { 1, 0, 0, 3, 0 },
21592 { 1, 0, 0, -4, 2 },
21593 { 1, 0, -2, 4, -2 },
21594 { 1, -2, 0, -1, 0 },
21595
21596 /* 651-NFLS */
21597 { 0, 1, -4, 2, -1 },
21598 { 1, 0, -2, 0, -3 },
21599 { 0, 0, 4, -4, 4 }
21600 };
21601 }
21602
21603
21604 /* Fundamental-argument multipliers: planetary terms */
21605 private static final int mfapl[][] = {
21606
21607 /* 1-10 */
21608 { 0, 0, 1, -1, 1, 0, 0, -1, 0, -2, 5, 0, 0, 0 },
21609 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, -1 },
21610 { 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, -2 },
21611 { 0, 0, 1, -1, 1, 0, -8, 12, 0, 0, 0, 0, 0, 0 },
21612 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2 },
21613 { 0, 0, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0 },
21614 { 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0 },
21615 { 0, 0, 0, 0, 0, 0, 0, 8,-16, 4, 5, 0, 0, 0 },
21616 { 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0 },
21617 { 0, 0, 0, 0, 1, 0, 0, -1, 2, 0, 0, 0, 0, 0 },
21618
21619 /* 11-20 */
21620 { 0, 0, 0, 0, 0, 0, 8,-13, 0, 0, 0, 0, 0, -1 },
21621 { 0, 0, 1, -1, 1, 0, 0, -1, 0, 2, -5, 0, 0, 0 },
21622 { 0, 0, 2, -2, 1, 0, -5, 6, 0, 0, 0, 0, 0, 0 },
21623 { 0, 0, 0, 0, 0, 0, 4, -6, 0, 0, 0, 0, 0, -2 },
21624 { 0, 0, 0, 0, 0, 0, 0, 3, 0, -1, 0, 0, 0, 2 },
21625 { 0, 0, 0, 0, 0, 0, 0, 2, -8, 3, 0, 0, 0, -2 },
21626 { 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 0, -2 },
21627 { 0, 0, 0, 0, 0, 0, 0, 6, -8, 3, 0, 0, 0, 2 },
21628 { 0, 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0 },
21629 { 0, 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0, 0 },
21630
21631 /* 21-30 */
21632 { 0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0 },
21633 { 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2 },
21634 { 0, 0, 0, 0, 1, 0, 0, -4, 8, -3, 0, 0, 0, 0 },
21635 { 0, 0, 0, 0, 1, 0, 0, 4, -8, 3, 0, 0, 0, 0 },
21636 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, 0 },
21637 { 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 2 },
21638 { 0, 0, 1, -1, 1, 0, 0, 0, -2, 0, 0, 0, 0, 0 },
21639 { 2, 0, 0, -2, -1, 0, 0, -2, 0, 2, 0, 0, 0, 0 },
21640 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1 },
21641 { 2, 0, 0, -2, 0, 0, 0, -2, 0, 2, 0, 0, 0, 0 },
21642
21643 /* 31-40 */
21644 { 0, 0, 0, 0, 0, 0, 0, 2, 0, -2, 0, 0, 0, 0 },
21645 { 0, 0, 0, 0, 0, 0, 8,-13, 0, 0, 0, 0, 0, 0 },
21646 { 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2 },
21647 { 0, 0, 0, 0, 0, 0, 5, -8, 0, 0, 0, 0, 0, -2 },
21648 { 0, 0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0 },
21649 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, 1 },
21650 { 2, 0, 0, -2, 0, 0, 0, -2, 0, 3, 0, 0, 0, 0 },
21651 { 0, 0, 1, -1, 1, 0, 0, -1, 0, -1, 0, 0, 0, 0 },
21652 { 0, 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, 0 },
21653 { 0, 0, 1, -1, 1, 0, 0, -1, 0, 0, -1, 0, 0, 0 },
21654
21655 /* 41-50 */
21656 { 0, 0, 0, 0, 0, 0, 0, 1, 0, -2, 0, 0, 0, 0 },
21657 { 0, 0, 0, 0, 0, 0, 5, -7, 0, 0, 0, 0, 0, -2 },
21658 { 0, 0, 1, -1, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0 },
21659 { 0, 0, 0, 0, 0, 0, 0, 4, 0, -2, 0, 0, 0, 2 },
21660 { 0, 0, 0, 0, 0, 0, 8,-13, 0, 0, 0, 0, 0, -2 },
21661 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 },
21662 { 0, 0, 0, 0, 0, 0, 2, -1, 0, 0, 0, 0, 0, 2 },
21663 { 1, 0, 0, 0, 0, 0,-18, 16, 0, 0, 0, 0, 0, 0 },
21664 { 0, 0, 1, -1, 1, 0, 0, -1, 0, 2, 0, 0, 0, 0 },
21665 { 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2 },
21666
21667 /* 51-60 */
21668 { 0, 0, 1, -1, 1, 0, -5, 7, 0, 0, 0, 0, 0, 0 },
21669 { 1, 0, 0, 0, 0, 0,-10, 3, 0, 0, 0, 0, 0, 0 },
21670 { 0, 0, 2, -2, 0, 0, -5, 6, 0, 0, 0, 0, 0, 0 },
21671 { 0, 0, 0, 0, 0, 0, 0, 2, 0, -1, 0, 0, 0, 2 },
21672 { 1, 0, 2, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
21673 { 0, 0, 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 2 },
21674 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1 },
21675 { 1, 0, -2, 0, -2, 0, 0, 4, -8, 3, 0, 0, 0, 0 },
21676 { 0, 0, 1, -1, 1, 0, 0, -1, 0, 0, 2, 0, 0, 0 },
21677 { 0, 0, 2, -2, 1, 0, -3, 3, 0, 0, 0, 0, 0, 0 },
21678
21679 /* 61-70 */
21680 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2 },
21681 { 0, 0, 0, 0, 0, 0, 0, 8,-16, 4, 5, 0, 0, -2 },
21682 { 0, 0, 1, -1, 1, 0, 0, 3, -8, 3, 0, 0, 0, 0 },
21683 { 0, 0, 0, 0, 0, 0, 8,-11, 0, 0, 0, 0, 0, -2 },
21684 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 2 },
21685 { 0, 0, 0, 0, 0, 0, 0, 8,-16, 4, 5, 0, 0, 2 },
21686 { 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, -1 },
21687 { 0, 0, 0, 0, 0, 0, 4, -6, 0, 0, 0, 0, 0, -1 },
21688 { 0, 0, 0, 0, 0, 0, 0, 1, 0, -3, 0, 0, 0, -2 },
21689 { 0, 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 0 },
21690
21691 /* 71-80 */
21692 { 0, 0, 0, 0, 0, 0, 6, -8, 0, 0, 0, 0, 0, -2 },
21693 { 0, 0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 0, 2 },
21694 { 0, 0, 0, 0, 0, 0, 8,-15, 0, 0, 0, 0, 0, -2 },
21695 { 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, 0, 0, 0, -2 },
21696 { 0, 0, 0, 0, 0, 0, 1, -3, 0, 0, 0, 0, 0, -2 },
21697 { 0, 0, 0, 0, 0, 0, 0, 3, 0, -2, 0, 0, 0, 2 },
21698 { 0, 0, 1, -1, 1, 0, 0, -5, 8, -3, 0, 0, 0, 0 },
21699 { 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 2 },
21700 { 0, 0, 0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 2 },
21701 { 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, 0 },
21702
21703 /* 81-90 */
21704 { 2, 0, 0, -2, 1, 0, 0, -2, 0, 3, 0, 0, 0, 0 },
21705 { 0, 0, 0, 0, 0, 0, 5, -8, 0, 0, 0, 0, 0, -1 },
21706 { 2, 0, 0, -2, 0, 0, -3, 3, 0, 0, 0, 0, 0, 0 },
21707 { 0, 0, 0, 0, 1, 0, 8,-13, 0, 0, 0, 0, 0, 0 },
21708 { 0, 0, 0, 0, 1, 0, 0, 0, 0, -2, 5, 0, 0, 0 },
21709 { 1, 0, 0, -1, 0, 0, -3, 4, 0, 0, 0, 0, 0, 0 },
21710 { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2 },
21711 { 1, 0, 0, 0, -1, 0,-18, 16, 0, 0, 0, 0, 0, 0 },
21712 { 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, -5, 0, 0, 0 },
21713 { 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0 },
21714
21715 /* 91-100 */
21716 { 1, 0, 0, -2, 0, 0, 19,-21, 3, 0, 0, 0, 0, 0 },
21717 { 0, 0, 0, 0, 1, 0, -8, 13, 0, 0, 0, 0, 0, 0 },
21718 { 0, 0, 1, -1, 1, 0, 0, -1, 0, 0, 1, 0, 0, 0 },
21719 { 0, 0, 0, 0, 0, 0, 7, -9, 0, 0, 0, 0, 0, -2 },
21720 { 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2 },
21721 { 1, 0, 0, 0, 1, 0,-18, 16, 0, 0, 0, 0, 0, 0 },
21722 { 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 0, -1 },
21723 { 0, 0, 0, 0, 0, 0, 0, 6,-16, 4, 5, 0, 0, -2 },
21724 { 0, 0, 0, 0, 0, 0, 4, -7, 0, 0, 0, 0, 0, -2 },
21725 { 0, 0, 0, 0, 0, 0, 3, -7, 0, 0, 0, 0, 0, -2 },
21726
21727 /* 101-110 */
21728 { 0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, -1 },
21729 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1 },
21730 { 2, 0, 0, -2, 1, 0, 0, -2, 0, 2, 0, 0, 0, 0 },
21731 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, -1 },
21732 { 0, 0, 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0 },
21733 { 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, 0 },
21734 { 2, 0, 0, -2, -1, 0, 0, -2, 0, 3, 0, 0, 0, 0 },
21735 { 0, 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 0 },
21736 { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0 },
21737 { 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 2 },
21738
21739 /* 111-120 */
21740 { 0, 0, 0, 0, 1, 0, 0, 1, -2, 0, 0, 0, 0, 0 },
21741 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2 },
21742 { 0, 0, 2, -2, 1, 0, 0, -2, 0, 2, 0, 0, 0, 0 },
21743 { 0, 0, 0, 0, 0, 0, 0, 2, 0, -3, 0, 0, 0, 0 },
21744 { 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, -1 },
21745 { 0, 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 2 },
21746 { 0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, 0 },
21747 { 0, 0, 1, -1, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0 },
21748 { 2, 0, 0, -2, 0, 0, -6, 8, 0, 0, 0, 0, 0, 0 },
21749 { 0, 0, 1, -1, 1, 0, 0, -2, 2, 0, 0, 0, 0, 0 },
21750
21751 /* 121-130 */
21752 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1 },
21753 { 0, 0, 1, -1, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0 },
21754 { 0, 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, -1 },
21755 { 0, 0, 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0 },
21756 { 0, 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, -2 },
21757 { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0 },
21758 { 0, 0, 0, 0, 0, 0, 8,-10, 0, 0, 0, 0, 0, -2 },
21759 { 0, 0, 1, -1, 1, 0, -3, 4, 0, 0, 0, 0, 0, 0 },
21760 { 0, 0, 0, 0, 0, 0, 6, -9, 0, 0, 0, 0, 0, -2 },
21761 { 1, 0, 0, -1, 1, 0, 0, -1, 0, 2, 0, 0, 0, 0 },
21762
21763 /* 131-140 */
21764 { 0, 0, 0, 0, 0, 0, 5, -7, 0, 0, 0, 0, 0, -1 },
21765 { 0, 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 0, 0 },
21766 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -1 },
21767 { 0, 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, -1 },
21768 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
21769 { 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 2 },
21770 { 0, 0, 0, 0, 0, 0, 0, 4, 0, -3, 0, 0, 0, 2 },
21771 { 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 1 },
21772 { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1 },
21773 { 0, 0, 0, 0, 1, 0, 2, -3, 0, 0, 0, 0, 0, 0 },
21774
21775 /* 141-150 */
21776 { 1, 0, 0, -1, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0 },
21777 { 0, 0, 0, 0, 0, 0, 1, -3, 0, 0, 0, 0, 0, -1 },
21778 { 0, 0, 0, 0, 0, 0, 0, 5, -4, 0, 0, 0, 0, 2 },
21779 { 0, 0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 2 },
21780 { 0, 0, 0, 0, 0, 0, 9,-11, 0, 0, 0, 0, 0, -2 },
21781 { 0, 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0, -1 },
21782 { 0, 0, 0, 0, 0, 0, 0, 8,-15, 0, 0, 0, 0, 0 },
21783 { 0, 0, 1, -1, 1, 0, -4, 5, 0, 0, 0, 0, 0, 0 },
21784 { 0, 0, 0, 0, 0, 0, 4, -6, 0, 0, 0, 0, 0, 0 },
21785 { 0, 0, 0, 0, 0, 0, 0, 4, 0, -1, 0, 0, 0, 2 },
21786
21787 /* 151-160 */
21788 { 1, 0, 0, -1, 1, 0, -3, 4, 0, 0, 0, 0, 0, 0 },
21789 { 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
21790 { 0, 0, 1, -1, 1, 0, 0, -1, 0, -4, 10, 0, 0, 0 },
21791 { 0, 0, 0, 0, 1, 0, 1, -1, 0, 0, 0, 0, 0, 0 },
21792 { 0, 0, 1, -1, 0, 0, 0, -1, 0, 0, -1, 0, 0, 0 },
21793 { 0, 0, 0, 0, 0, 0, 0, 1, 0, -3, 0, 0, 0, 0 },
21794 { 0, 0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 0, 2 },
21795 { 0, 0, 0, 0, 0, 0, 0, 1, 0, -4, 0, 0, 0, -2 },
21796 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, -2 },
21797 { 0, 0, 2, -2, 1, 0, -4, 4, 0, 0, 0, 0, 0, 0 },
21798
21799 /* 161-170 */
21800 { 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1, 0, 0, 2 },
21801 { 0, 0, 0, 0, 0, 0, 0, 4, -3, 0, 0, 0, 0, 2 },
21802 { 0, 0, 1, -1, 1, 0, 0, -1, 0, 0, 0, 0, 2, 0 },
21803 { 0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, -1 },
21804 { 0, 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, -1 },
21805 { 0, 0, 0, 0, 0, 0, 5, -8, 0, 0, 0, 0, 0, 0 },
21806 { 0, 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 1 },
21807 { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
21808 { 0, 0, 2, -2, 1, 0, 0, -9, 13, 0, 0, 0, 0, 0 },
21809 { 2, 0, 2, 0, 2, 0, 0, 2, 0, -3, 0, 0, 0, 0 },
21810
21811 /* 171-180 */
21812 { 0, 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, 0, -2 },
21813 { 0, 0, 1, -1, 2, 0, 0, -1, 0, 0, 2, 0, 0, 0 },
21814 { 1, 0, 0, -1, -1, 0, -3, 4, 0, 0, 0, 0, 0, 0 },
21815 { 0, 0, 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, -2 },
21816 { 0, 0, 0, 0, 0, 0, 6, -6, 0, 0, 0, 0, 0, 0 },
21817 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1 },
21818 { 1, 0, 2, 0, 1, 0, 0, -2, 0, 3, 0, 0, 0, 0 },
21819 { 1, 0, -2, 0, -1, 0, 0, -1, 0, 0, 0, 0, 0, 0 },
21820 { 0, 0, 0, 0, 1, 0, 0, -2, 4, 0, 0, 0, 0, 0 },
21821 { 0, 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0 },
21822
21823 /* 181-190 */
21824 { 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 2 },
21825 { 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1 },
21826 { 0, 0, 2, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
21827 { 0, 0, 0, 0, 0, 0, 0, 1, -8, 3, 0, 0, 0, -2 },
21828 { 0, 0, 0, 0, 0, 0, 6,-10, 0, 0, 0, 0, 0, -2 },
21829 { 0, 0, 0, 0, 0, 0, 0, 7, -8, 3, 0, 0, 0, 2 },
21830 { 0, 0, 0, 0, 1, 0, -3, 5, 0, 0, 0, 0, 0, 0 },
21831 { 0, 0, 1, -1, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0 },
21832 { 0, 0, 1, -1, 0, 0, -5, 7, 0, 0, 0, 0, 0, 0 },
21833 { 0, 0, 0, 0, 0, 0, 0, 2, 0, -2, 0, 0, 0, 1 },
21834
21835 /* 191-200 */
21836 { 0, 0, 0, 0, 0, 0, 0, 2, 0, -1, 0, 0, 0, 0 },
21837 { 0, 0, 0, 0, 0, 0, 7,-10, 0, 0, 0, 0, 0, -2 },
21838 { 1, 0, 0, -2, 0, 0, 0, -2, 0, 2, 0, 0, 0, 0 },
21839 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0 },
21840 { 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, -5, 0, 0, 0 },
21841 { 0, 0, 0, 0, 0, 0, 6, -8, 0, 0, 0, 0, 0, -1 },
21842 { 0, 0, 1, -1, 1, 0, 0, -9, 15, 0, 0, 0, 0, 0 },
21843 { 0, 0, 0, 0, 1, 0, -2, 3, 0, 0, 0, 0, 0, 0 },
21844 { 0, 0, 0, 0, 1, 0, -1, 1, 0, 0, 0, 0, 0, 0 },
21845 { 0, 0, 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, 0 },
21846
21847 /* 201-210 */
21848 { 0, 0, 0, 0, 0, 0, 0, 1, -4, 0, 0, 0, 0, -2 },
21849 { 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 2 },
21850 { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, -1, 0, 0, 2 },
21851 { 2, 0, 0, -2, 1, 0, -6, 8, 0, 0, 0, 0, 0, 0 },
21852 { 0, 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 0, -1 },
21853 { 0, 0, 1, -1, 1, 0, 3, -6, 0, 0, 0, 0, 0, 0 },
21854 { 0, 0, 1, -1, 1, 0, -2, 2, 0, 0, 0, 0, 0, 0 },
21855 { 0, 0, 1, -1, 1, 0, 8,-14, 0, 0, 0, 0, 0, 0 },
21856 { 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 },
21857 { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
21858
21859 /* 211-220 */
21860 { 0, 0, 0, 0, 1, 0, 0, 8,-15, 0, 0, 0, 0, 0 },
21861 { 0, 0, 0, 0, 0, 0, 0, 4, -6, 0, 0, 0, 0, 0 },
21862 { 0, 0, 0, 0, 0, 0, 7, -7, 0, 0, 0, 0, 0, 0 },
21863 { 2, 0, 0, -2, 1, 0, -3, 3, 0, 0, 0, 0, 0, 0 },
21864 { 0, 0, 0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 2 },
21865 { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 2 },
21866 { 2, 0, -1, -1, 0, 0, 0, 3, -7, 0, 0, 0, 0, 0 },
21867 { 0, 0, 0, 0, 0, 0, 0, 4, -7, 0, 0, 0, 0, -2 },
21868 { 0, 0, 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0 },
21869 { 0, 0, 1, -1, 1, 0, 0, -3, 4, 0, 0, 0, 0, 0 },
21870
21871 /* 221-230 */
21872 { 2, 0, 0, -2, 0, 0, 0, -6, 8, 0, 0, 0, 0, 0 },
21873 { 2, 0, 0, -2, 0, 0, 0, -5, 6, 0, 0, 0, 0, 0 },
21874 { 0, 0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0 },
21875 { 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1 },
21876 { 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 1 },
21877 { 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 2 },
21878 { 0, 0, 0, 0, 1, 0, 0, 1, 0, -1, 0, 0, 0, 0 },
21879 { 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0 },
21880 { 0, 0, 0, 0, 0, 0, 3, -9, 4, 0, 0, 0, 0, -2 },
21881 { 0, 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, -2 },
21882
21883 /* 231-240 */
21884 { 0, 0, 0, 0, 0, 0, 0, 2, 0, -4, 0, 0, 0, -2 },
21885 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1 },
21886 { 0, 0, 0, 0, 0, 0, 7,-11, 0, 0, 0, 0, 0, -2 },
21887 { 0, 0, 0, 0, 0, 0, 3, -5, 4, 0, 0, 0, 0, 2 },
21888 { 0, 0, 1, -1, 0, 0, 0, -1, 0, -1, 1, 0, 0, 0 },
21889 { 2, 0, 0, 0, 0, 0, 0, -2, 0, 3, 0, 0, 0, 0 },
21890 { 0, 0, 0, 0, 0, 0, 0, 8,-15, 0, 0, 0, 0, -2 },
21891 { 0, 0, 1, -1, 2, 0, 0, -2, 2, 0, 0, 0, 0, 0 },
21892 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 2 },
21893 { 0, 0, 0, 0, 0, 0, 6, -6, 0, 0, 0, 0, 0, -1 },
21894
21895 /* 241-250 */
21896 { 0, 0, 1, -1, 1, 0, 0, -1, 0, -1, 1, 0, 0, 0 },
21897 { 0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, 1 },
21898 { 0, 0, 0, 0, 0, 0, 0, 4, -7, 0, 0, 0, 0, 0 },
21899 { 0, 0, 0, 0, 0, 0, 0, 3, -8, 3, 0, 0, 0, 0 },
21900 { 0, 0, 1, -1, 1, 0, 2, -4, 0, -3, 0, 0, 0, 0 },
21901 { 0, 0, 0, 0, 1, 0, 3, -5, 0, 2, 0, 0, 0, 0 },
21902 { 0, 0, 0, 0, 0, 0, 0, 3, 0, -3, 0, 0, 0, 2 },
21903 { 0, 0, 2, -2, 2, 0, -8, 11, 0, 0, 0, 0, 0, 0 },
21904 { 0, 0, 0, 0, 0, 0, 0, 5, -8, 3, 0, 0, 0, 0 },
21905 { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -2, 0, 0, 0 },
21906
21907 /* 251-260 */
21908 { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 2 },
21909 { 0, 0, 0, 0, 0, 0, 0, 5, -9, 0, 0, 0, 0, -2 },
21910 { 0, 0, 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 2 },
21911 { 0, 0, 0, 0, 0, 0, 7, -9, 0, 0, 0, 0, 0, -1 },
21912 { 0, 0, 0, 0, 0, 0, 4, -7, 0, 0, 0, 0, 0, -1 },
21913 { 0, 0, 0, 0, 0, 0, 2, -1, 0, 0, 0, 0, 0, 0 },
21914 { 1, 0, -2, -2, -2, 0, 0, -2, 0, 2, 0, 0, 0, 0 },
21915 { 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 2 },
21916 { 0, 0, 0, 0, 0, 0, 0, 2, 0, -2, 5, 0, 0, 2 },
21917 { 0, 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 1 },
21918
21919 /* 261-270 */
21920 { 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 2 },
21921 { 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, -5, 0, 0, 2 },
21922 { 2, 0, 0, -2, -1, 0, 0, -2, 0, 0, 5, 0, 0, 0 },
21923 { 2, 0, 0, -2, -1, 0, -6, 8, 0, 0, 0, 0, 0, 0 },
21924 { 1, 0, 0, -2, 0, 0, -3, 3, 0, 0, 0, 0, 0, 0 },
21925 { 0, 0, 0, 0, 0, 0, 8, -8, 0, 0, 0, 0, 0, 0 },
21926 { 0, 0, 0, 0, 0, 0, 0, 3, 0, 2, -5, 0, 0, 2 },
21927 { 0, 0, 0, 0, 1, 0, 3, -7, 4, 0, 0, 0, 0, 0 },
21928 { 0, 0, 2, -2, 1, 0, -2, 2, 0, 0, 0, 0, 0, 0 },
21929 { 0, 0, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0 },
21930
21931 /* 271-280 */
21932 { 0, 0, 1, -1, 0, 0, 0, -1, 0, -2, 5, 0, 0, 0 },
21933 { 0, 0, 0, 0, 0, 0, 0, 3, 0, -3, 0, 0, 0, 0 },
21934 { 0, 0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 0, 1 },
21935 { 0, 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0, -2 },
21936 { 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 2 },
21937 { 0, 0, 0, 0, 0, 0, 0, 6,-15, 0, 0, 0, 0, -2 },
21938 { 0, 0, 0, 0, 0, 0, 0, 3, 0, 1, 0, 0, 0, 2 },
21939 { 1, 0, 0, -1, 0, 0, 0, -3, 4, 0, 0, 0, 0, 0 },
21940 { 0, 0, 0, 0, 1, 0, -3, 7, -4, 0, 0, 0, 0, 0 },
21941 { 0, 0, 0, 0, 0, 0, 0, 5, 0, -2, 0, 0, 0, 2 },
21942
21943 /* 281-290 */
21944 { 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, 1 },
21945 { 0, 0, 2, -2, 2, 0, -5, 6, 0, 0, 0, 0, 0, 0 },
21946 { 0, 0, 2, -2, 2, 0, -3, 3, 0, 0, 0, 0, 0, 0 },
21947 { 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 2 },
21948 { 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0 },
21949 { 0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, 2 },
21950 { 0, 0, 0, 0, 0, 0, 0, 4, -8, 0, 0, 0, 0, -2 },
21951 { 0, 0, 0, 0, 0, 0, 0, 4, -5, 0, 0, 0, 0, 0 },
21952 { 0, 0, 0, 0, 0, 0, 5, -7, 0, 0, 0, 0, 0, 0 },
21953 { 0, 0, 0, 0, 0, 0, 0, 6,-11, 0, 0, 0, 0, -2 },
21954
21955 /* 291-300 */
21956 { 0, 0, 0, 0, 0, 0, 0, 1, -3, 0, 0, 0, 0, -2 },
21957 { 0, 0, 1, -1, 1, 0, 0, -1, 0, 3, 0, 0, 0, 0 },
21958 { 0, 0, 1, -1, 0, 0, 0, -1, 0, 2, 0, 0, 0, 0 },
21959 { 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, 1 },
21960 { 0, 0, 0, 0, 0, 0, 9,-12, 0, 0, 0, 0, 0, -2 },
21961 { 0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, 1 },
21962 { 0, 0, 1, -1, 0, 0, -8, 12, 0, 0, 0, 0, 0, 0 },
21963 { 0, 0, 1, -1, 1, 0, -2, 3, 0, 0, 0, 0, 0, 0 },
21964 { 0, 0, 0, 0, 0, 0, 7, -7, 0, 0, 0, 0, 0, -1 },
21965 { 0, 0, 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, -1 },
21966
21967 /* 301-310 */
21968 { 0, 0, 0, 0, 0, 0, 0, 6, -6, 0, 0, 0, 0, 2 },
21969 { 0, 0, 0, 0, 0, 1, 0, -4, 0, 0, 0, 0, 0, -2 },
21970 { 0, 0, 1, -1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
21971 { 0, 0, 0, 0, 0, 0, 6, -9, 0, 0, 0, 0, 0, -1 },
21972 { 0, 0, 1, -1, -1, 0, 0, 0, -2, 0, 0, 0, 0, 0 },
21973 { 0, 0, 0, 0, 0, 0, 0, 1, -5, 0, 0, 0, 0, -2 },
21974 { 2, 0, 0, -2, 0, 0, 0, -2, 0, 3, -1, 0, 0, 0 },
21975 { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, -2, 0, 0, 0 },
21976 { 0, 0, 0, 0, 0, 0, 0, 5, -9, 0, 0, 0, 0, 0 },
21977 { 0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, 2 },
21978
21979 /* 311-320 */
21980 { 0, 0, 0, 0, 0, 0, 9, -9, 0, 0, 0, 0, 0, -1 },
21981 { 0, 0, 1, -1, 1, 0, 0, -1, 0, 0, 3, 0, 0, 0 },
21982 { 0, 0, 0, 0, 1, 0, 0, 2, -4, 0, 0, 0, 0, 0 },
21983 { 0, 0, 0, 0, 0, 0, 5, -3, 0, 0, 0, 0, 0, 2 },
21984 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 1 },
21985 { 0, 0, 1, -1, 2, 0, 0, -1, 0, 2, 0, 0, 0, 0 },
21986 { 0, 0, 0, 0, 0, 0, 5, -9, 0, 0, 0, 0, 0, -2 },
21987 { 0, 0, 0, 0, 0, 0, 0, 5, -3, 0, 0, 0, 0, 2 },
21988 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 2 },
21989 { 0, 0, 2, 0, 2, 0, 0, 4, -8, 3, 0, 0, 0, 0 },
21990
21991 /* 321-330 */
21992 { 0, 0, 2, 0, 2, 0, 0, -4, 8, -3, 0, 0, 0, 0 },
21993 { 0, 0, 0, 0, 0, 0, 0, 5, 0, -3, 0, 0, 0, 2 },
21994 { 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0 },
21995 { 2, 0, -1, -1, -1, 0, 0, -1, 0, 3, 0, 0, 0, 0 },
21996 { 0, 0, 0, 0, 0, 0, 4, -3, 0, 0, 0, 0, 0, 2 },
21997 { 0, 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 0, 2 },
21998 { 0, 0, 0, 0, 0, 0, 5,-10, 0, 0, 0, 0, 0, -2 },
21999 { 0, 0, 0, 0, 0, 0, 8,-13, 0, 0, 0, 0, 0, 1 },
22000 { 0, 0, 2, -2, 1, -1, 0, 2, 0, 0, 0, 0, 0, 0 },
22001 { 0, 0, 1, -1, 1, 0, 0, -1, 0, 0, 0, 2, 0, 0 },
22002
22003 /* 331-340 */
22004 { 0, 0, 0, 0, 1, 0, 3, -5, 0, 0, 0, 0, 0, 0 },
22005 { 1, 0, 0, -2, 0, 0, 0, -2, 0, 3, 0, 0, 0, 0 },
22006 { 0, 0, 2, -2, 0, 0, -3, 3, 0, 0, 0, 0, 0, 0 },
22007 { 0, 0, 0, 0, 0, 0, 9, -9, 0, 0, 0, 0, 0, 0 },
22008 { 0, 0, 2, 0, 2, 0, 1, -1, 0, 0, 0, 0, 0, 0 },
22009 { 0, 0, 2, -2, 1, 0, 0, -8, 11, 0, 0, 0, 0, 0 },
22010 { 0, 0, 2, -2, 1, 0, 0, -2, 0, 0, 2, 0, 0, 0 },
22011 { 0, 0, 1, -1, 1, 0, 0, -1, 0, -1, 2, 0, 0, 0 },
22012 { 0, 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 0, 2 },
22013 { 0, 0, 0, 0, 0, 0, 2, -6, 0, 0, 0, 0, 0, -2 },
22014
22015 /* 341-350 */
22016 { 0, 0, 0, 0, 0, 0, 0, 8,-15, 0, 0, 0, 0, -1 },
22017 { 0, 0, 0, 0, 0, 0, 0, 5, -2, 0, 0, 0, 0, 2 },
22018 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2 },
22019 { 0, 0, 0, 0, 0, 0, 0, 7,-13, 0, 0, 0, 0, -2 },
22020 { 0, 0, 0, 0, 0, 0, 0, 3, 0, -2, 0, 0, 0, 0 },
22021 { 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 2 },
22022 { 0, 0, 2, -2, 1, 0, 0, -2, 0, 3, 0, 0, 0, 0 },
22023 { 0, 0, 0, 0, 0, 0, 8, -8, 0, 0, 0, 0, 0, -1 },
22024 { 0, 0, 0, 0, 0, 0, 8,-10, 0, 0, 0, 0, 0, -1 },
22025 { 0, 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 0, 1 },
22026
22027 /* 351-360 */
22028 { 0, 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, 0, -1 },
22029 { 0, 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, -1 },
22030 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, 2 },
22031 { 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2 },
22032 { 0, 0, 0, 0, 0, 0, 0, 2, 0, -4, 0, 0, 0, 0 },
22033 { 2, 0, 0, -2, -1, 0, 0, -5, 6, 0, 0, 0, 0, 0 },
22034 { 0, 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, 0, 0, -2 },
22035 { 2, 0, -1, -1, -1, 0, 0, 3, -7, 0, 0, 0, 0, 0 },
22036 { 0, 0, 0, 0, 0, 0, 0, 5, -8, 0, 0, 0, 0, 0 },
22037 { 0, 0, 2, 0, 2, 0, -1, 1, 0, 0, 0, 0, 0, 0 },
22038
22039 /* 361-370 */
22040 { 2, 0, 0, -2, 0, 0, 0, -2, 0, 4, -3, 0, 0, 0 },
22041 { 0, 0, 0, 0, 0, 0, 0, 6,-11, 0, 0, 0, 0, 0 },
22042 { 2, 0, 0, -2, 1, 0, 0, -6, 8, 0, 0, 0, 0, 0 },
22043 { 0, 0, 0, 0, 0, 0, 0, 4, -8, 1, 5, 0, 0, -2 },
22044 { 0, 0, 0, 0, 0, 0, 0, 6, -5, 0, 0, 0, 0, 2 },
22045 { 1, 0, -2, -2, -2, 0, -3, 3, 0, 0, 0, 0, 0, 0 },
22046 { 0, 0, 1, -1, 2, 0, 0, 0, -2, 0, 0, 0, 0, 0 },
22047 { 0, 0, 0, 0, 2, 0, 0, 4, -8, 3, 0, 0, 0, 0 },
22048 { 0, 0, 0, 0, 2, 0, 0, -4, 8, -3, 0, 0, 0, 0 },
22049 { 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 1 },
22050
22051 /* 371-380 */
22052 { 0, 0, 0, 0, 0, 0, 0, 6, -7, 0, 0, 0, 0, 2 },
22053 { 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, -2, 0, 0, 2 },
22054 { 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, -2, 0, 0, 2 },
22055 { 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 1 },
22056 { 0, 0, 0, 0, 0, 0, 0, 1, -6, 0, 0, 0, 0, -2 },
22057 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, -5, 0, 0, 2 },
22058 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2 },
22059 { 0, 0, 0, 0, 0, 0, 3, -5, 0, 2, 0, 0, 0, 0 },
22060 { 0, 0, 0, 0, 0, 0, 0, 7,-13, 0, 0, 0, 0, 0 },
22061 { 0, 0, 0, 0, 0, 0, 0, 2, 0, -2, 0, 0, 0, 2 },
22062
22063 /* 381-390 */
22064 { 0, 0, 1, -1, 0, 0, 0, -1, 0, 0, 2, 0, 0, 0 },
22065 { 0, 0, 0, 0, 1, 0, 0, -8, 15, 0, 0, 0, 0, 0 },
22066 { 2, 0, 0, -2, -2, 0, -3, 3, 0, 0, 0, 0, 0, 0 },
22067 { 2, 0, -1, -1, -1, 0, 0, -1, 0, 2, 0, 0, 0, 0 },
22068 { 1, 0, 2, -2, 2, 0, 0, -2, 0, 2, 0, 0, 0, 0 },
22069 { 1, 0, -1, 1, -1, 0,-18, 17, 0, 0, 0, 0, 0, 0 },
22070 { 0, 0, 2, 0, 2, 0, 0, 1, 0, -1, 0, 0, 0, 0 },
22071 { 0, 0, 2, 0, 2, 0, 0, -1, 0, 1, 0, 0, 0, 0 },
22072 { 0, 0, 2, -2, -1, 0, -5, 6, 0, 0, 0, 0, 0, 0 },
22073 { 0, 0, 1, -1, 2, 0, 0, -1, 0, 1, 0, 0, 0, 0 },
22074
22075 /* 391-400 */
22076 { 0, 0, 0, 0, 1, 0, 2, -2, 0, 0, 0, 0, 0, 0 },
22077 { 0, 0, 0, 0, 0, 0, 8,-16, 0, 0, 0, 0, 0, -2 },
22078 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 2 },
22079 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2 },
22080 { 0, 0, 0, 0, 2, 0, 0, -1, 2, 0, 0, 0, 0, 0 },
22081 { 2, 0, -1, -1, -2, 0, 0, -1, 0, 2, 0, 0, 0, 0 },
22082 { 0, 0, 0, 0, 0, 0, 6,-10, 0, 0, 0, 0, 0, -1 },
22083 { 0, 0, 1, -1, 1, 0, 0, -1, 0, -2, 4, 0, 0, 0 },
22084 { 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 2 },
22085 { 2, 0, 0, -2, -1, 0, 0, -2, 0, 4, -5, 0, 0, 0 },
22086
22087 /* 401-410 */
22088 { 2, 0, 0, -2, -1, 0, -3, 3, 0, 0, 0, 0, 0, 0 },
22089 { 2, 0, -1, -1, -1, 0, 0, -1, 0, 0, 0, 0, 0, 0 },
22090 { 1, 0, 1, -1, 1, 0, 0, -1, 0, 0, 0, 0, 0, 0 },
22091 { 1, 0, 0, -1, -1, 0, 0, -2, 2, 0, 0, 0, 0, 0 },
22092 { 1, 0, -1, -1, -1, 0, 20,-20, 0, 0, 0, 0, 0, 0 },
22093 { 0, 0, 2, -2, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0 },
22094 { 0, 0, 1, -1, 1, 0, 1, -2, 0, 0, 0, 0, 0, 0 },
22095 { 0, 0, 1, -1, 1, 0, -2, 1, 0, 0, 0, 0, 0, 0 },
22096 { 0, 0, 0, 0, 1, 0, 5, -8, 0, 0, 0, 0, 0, 0 },
22097 { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, -1, 0, 0, 0 },
22098
22099 /* 411-420 */
22100 { 0, 0, 0, 0, 0, 0, 9,-11, 0, 0, 0, 0, 0, -1 },
22101 { 0, 0, 0, 0, 0, 0, 5, -3, 0, 0, 0, 0, 0, 1 },
22102 { 0, 0, 0, 0, 0, 0, 0, 1, 0, -3, 0, 0, 0, -1 },
22103 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1 },
22104 { 0, 0, 0, 0, 0, 0, 6, -7, 0, 0, 0, 0, 0, 0 },
22105 { 0, 0, 0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 0 },
22106 { 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, -2 },
22107 { 0, 0, 1, -1, 1, 0, 0, -1, 0, 0, -2, 0, 0, 0 },
22108 { 0, 0, 1, -1, 2, 0, 0, -1, 0, -2, 5, 0, 0, 0 },
22109 { 0, 0, 0, 0, 0, 0, 0, 5, -7, 0, 0, 0, 0, 0 },
22110
22111 /* 421-430 */
22112 { 0, 0, 0, 0, 0, 0, 1, -3, 0, 0, 0, 0, 0, 0 },
22113 { 0, 0, 0, 0, 0, 0, 0, 5, -8, 0, 0, 0, 0, -2 },
22114 { 0, 0, 0, 0, 0, 0, 0, 2, -6, 0, 0, 0, 0, -2 },
22115 { 1, 0, 0, -2, 0, 0, 20,-21, 0, 0, 0, 0, 0, 0 },
22116 { 0, 0, 0, 0, 0, 0, 8,-12, 0, 0, 0, 0, 0, 0 },
22117 { 0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, 0 },
22118 { 0, 0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0 },
22119 { 0, 0, 1, -1, 2, 0, 0, -1, 0, -1, 0, 0, 0, 0 },
22120 { 0, 0, 0, 0, 0, 0, 8,-12, 0, 0, 0, 0, 0, -2 },
22121 { 0, 0, 0, 0, 0, 0, 0, 9,-17, 0, 0, 0, 0, 0 },
22122
22123 /* 431-440 */
22124 { 0, 0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 2 },
22125 { 0, 0, 0, 0, 0, 0, 0, 4, -8, 1, 5, 0, 0, 2 },
22126 { 0, 0, 0, 0, 0, 0, 0, 4, -6, 0, 0, 0, 0, -2 },
22127 { 0, 0, 0, 0, 0, 0, 0, 2, -7, 0, 0, 0, 0, -2 },
22128 { 1, 0, 0, -1, 1, 0, 0, -3, 4, 0, 0, 0, 0, 0 },
22129 { 1, 0, -2, 0, -2, 0,-10, 3, 0, 0, 0, 0, 0, 0 },
22130 { 0, 0, 0, 0, 1, 0, 0, -9, 17, 0, 0, 0, 0, 0 },
22131 { 0, 0, 0, 0, 0, 0, 1, -4, 0, 0, 0, 0, 0, -2 },
22132 { 1, 0, -2, -2, -2, 0, 0, -2, 0, 3, 0, 0, 0, 0 },
22133 { 1, 0, -1, 1, -1, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
22134
22135 /* 441-450 */
22136 { 0, 0, 2, -2, 2, 0, 0, -2, 0, 2, 0, 0, 0, 0 },
22137 { 0, 0, 1, -1, 2, 0, 0, -1, 0, 0, 1, 0, 0, 0 },
22138 { 0, 0, 1, -1, 2, 0, -5, 7, 0, 0, 0, 0, 0, 0 },
22139 { 0, 0, 0, 0, 1, 0, 0, 2, -2, 0, 0, 0, 0, 0 },
22140 { 0, 0, 0, 0, 0, 0, 4, -5, 0, 0, 0, 0, 0, -1 },
22141 { 0, 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, -2 },
22142 { 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 0, 0 },
22143 { 0, 0, 0, 0, 0, 0, 0, 5,-10, 0, 0, 0, 0, -2 },
22144 { 0, 0, 0, 0, 0, 0, 0, 4, 0, -4, 0, 0, 0, 2 },
22145 { 0, 0, 0, 0, 0, 0, 0, 2, 0, -5, 0, 0, 0, -2 },
22146
22147 /* 451-460 */
22148 { 0, 0, 0, 0, 0, 0, 0, 1, 0, -5, 0, 0, 0, -2 },
22149 { 0, 0, 0, 0, 0, 0, 0, 1, 0, -2, 5, 0, 0, 2 },
22150 { 0, 0, 0, 0, 0, 0, 0, 1, 0, -2, 0, 0, 0, -2 },
22151 { 0, 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0, 1 },
22152 { 1, 0, 0, -2, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0 },
22153 { 0, 0, 0, 0, 0, 0, 3, -7, 4, 0, 0, 0, 0, 0 },
22154 { 2, 0, 2, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
22155 { 0, 0, 1, -1, -1, 0, 0, -1, 0, -1, 0, 0, 0, 0 },
22156 { 0, 0, 0, 0, 1, 0, 0, 1, 0, -2, 0, 0, 0, 0 },
22157 { 0, 0, 0, 0, 0, 0, 0, 6,-10, 0, 0, 0, 0, -2 },
22158
22159 /* 461-470 */
22160 { 1, 0, 0, -1, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0 },
22161 { 0, 0, 2, -2, 1, 0, 0, 4, -8, 3, 0, 0, 0, 0 },
22162 { 0, 0, 2, -2, 1, 0, 0, 1, 0, -1, 0, 0, 0, 0 },
22163 { 0, 0, 2, -2, 1, 0, 0, -4, 8, -3, 0, 0, 0, 0 },
22164 { 0, 0, 2, -2, 1, 0, 0, -3, 0, 3, 0, 0, 0, 0 },
22165 { 0, 0, 2, -2, 1, 0, -5, 5, 0, 0, 0, 0, 0, 0 },
22166 { 0, 0, 1, -1, 1, 0, 1, -3, 0, 0, 0, 0, 0, 0 },
22167 { 0, 0, 1, -1, 1, 0, 0, -4, 6, 0, 0, 0, 0, 0 },
22168 { 0, 0, 1, -1, 1, 0, 0, -1, 0, 0, 0, -1, 0, 0 },
22169 { 0, 0, 1, -1, 1, 0, -5, 6, 0, 0, 0, 0, 0, 0 },
22170
22171 /* 471-480 */
22172 { 0, 0, 0, 0, 1, 0, 3, -4, 0, 0, 0, 0, 0, 0 },
22173 { 0, 0, 0, 0, 1, 0, -2, 2, 0, 0, 0, 0, 0, 0 },
22174 { 0, 0, 0, 0, 0, 0, 7,-10, 0, 0, 0, 0, 0, -1 },
22175 { 0, 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 0, 1 },
22176 { 0, 0, 0, 0, 0, 0, 4, -5, 0, 0, 0, 0, 0, -2 },
22177 { 0, 0, 0, 0, 0, 0, 3, -8, 0, 0, 0, 0, 0, -2 },
22178 { 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, 0, 0, 0, -1 },
22179 { 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, -1 },
22180 { 0, 0, 0, 0, 0, 0, 0, 7, -9, 0, 0, 0, 0, 2 },
22181 { 0, 0, 0, 0, 0, 0, 0, 7, -8, 0, 0, 0, 0, 2 },
22182
22183 /* 481-490 */
22184 { 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 2 },
22185 { 0, 0, 0, 0, 0, 0, 0, 3, -8, 3, 0, 0, 0, -2 },
22186 { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, -2, 0, 0, 1 },
22187 { 0, 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 1 },
22188 { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, -1 },
22189 { 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, -1 },
22190 { 2, 0, 0, -2, -1, 0, 0, -6, 8, 0, 0, 0, 0, 0 },
22191 { 2, 0, -1, -1, 1, 0, 0, 3, -7, 0, 0, 0, 0, 0 },
22192 { 0, 0, 2, -2, 1, 0, 0, -7, 9, 0, 0, 0, 0, 0 },
22193 { 0, 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, -1 },
22194
22195 /* 491-500 */
22196 { 0, 0, 1, -1, 2, 0, -8, 12, 0, 0, 0, 0, 0, 0 },
22197 { 1, 0, 0, 0, 0, 0, 0, -2, 0, 2, 0, 0, 0, 0 },
22198 { 1, 0, 0, -2, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0 },
22199 { 0, 0, 0, 0, 0, 0, 7, -8, 0, 0, 0, 0, 0, 0 },
22200 { 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0 },
22201 { 2, 0, 0, -2, 1, 0, 0, -5, 6, 0, 0, 0, 0, 0 },
22202 { 2, 0, 0, -2, -1, 0, 0, -2, 0, 3, -1, 0, 0, 0 },
22203 { 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
22204 { 1, 0, 0, -2, 1, 0, 0, -2, 0, 2, 0, 0, 0, 0 },
22205 { 1, 0, 0, -2, -1, 0, 0, -2, 0, 2, 0, 0, 0, 0 },
22206
22207 /* 501-510 */
22208 { 1, 0, 0, -1, -1, 0, 0, -3, 4, 0, 0, 0, 0, 0 },
22209 { 1, 0, -1, 0, -1, 0, -3, 5, 0, 0, 0, 0, 0, 0 },
22210 { 0, 0, 2, -2, 1, 0, 0, -4, 4, 0, 0, 0, 0, 0 },
22211 { 0, 0, 2, -2, 1, 0, 0, -2, 0, 0, 0, 0, 0, 0 },
22212 { 0, 0, 2, -2, 1, 0, -8, 11, 0, 0, 0, 0, 0, 0 },
22213 { 0, 0, 2, -2, 0, 0, 0, -9, 13, 0, 0, 0, 0, 0 },
22214 { 0, 0, 1, 1, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
22215 { 0, 0, 1, -1, 1, 0, 0, 1, -4, 0, 0, 0, 0, 0 },
22216 { 0, 0, 1, -1, 1, 0, 0, -1, 0, 1, -3, 0, 0, 0 },
22217 { 0, 0, 0, 0, 1, 0, 0, 7,-13, 0, 0, 0, 0, 0 },
22218
22219 /* 511-520 */
22220 { 0, 0, 0, 0, 1, 0, 0, 2, 0, -2, 0, 0, 0, 0 },
22221 { 0, 0, 0, 0, 1, 0, 0, -2, 2, 0, 0, 0, 0, 0 },
22222 { 0, 0, 0, 0, 1, 0, -3, 4, 0, 0, 0, 0, 0, 0 },
22223 { 0, 0, 0, 0, 0, 1, 0, -4, 0, 0, 0, 0, 0, 0 },
22224 { 0, 0, 0, 0, 0, 0, 7,-11, 0, 0, 0, 0, 0, -1 },
22225 { 0, 0, 0, 0, 0, 0, 6, -6, 0, 0, 0, 0, 0, 1 },
22226 { 0, 0, 0, 0, 0, 0, 6, -4, 0, 0, 0, 0, 0, 1 },
22227 { 0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, -1 },
22228 { 0, 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 0, 0 },
22229 { 0, 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, 1 },
22230
22231 /* 521-530 */
22232 { 0, 0, 0, 0, 0, 0, 1, -4, 0, 0, 0, 0, 0, -1 },
22233 { 0, 0, 0, 0, 0, 0, 0, 9,-17, 0, 0, 0, 0, -2 },
22234 { 0, 0, 0, 0, 0, 0, 0, 7, -7, 0, 0, 0, 0, 2 },
22235 { 0, 0, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 1 },
22236 { 0, 0, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, -1 },
22237 { 0, 0, 0, 0, 0, 0, 0, 4, -8, 0, 0, 0, 0, 0 },
22238 { 0, 0, 0, 0, 0, 0, 0, 4, -7, 0, 0, 0, 0, -1 },
22239 { 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1 },
22240 { 0, 0, 0, 0, 0, 0, 0, 1, 0, -4, 0, 0, 0, 0 },
22241 { 2, 0, 0, -2, 0, 0, 0, -4, 8, -3, 0, 0, 0, 0 },
22242
22243 /* 531-540 */
22244 { 2, 0, 0, -2, 0, 0, -2, 2, 0, 0, 0, 0, 0, 0 },
22245 { 1, 0, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0 },
22246 { 1, 0, 0, 0, 0, 0, 0, -4, 8, -3, 0, 0, 0, 0 },
22247 { 1, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0 },
22248 { 1, 0, 0, -2, 0, 0, 17,-16, 0, -2, 0, 0, 0, 0 },
22249 { 1, 0, 0, -1, 0, 0, 0, -2, 2, 0, 0, 0, 0, 0 },
22250 { 0, 0, 2, -2, 0, 0, 0, -2, 0, 2, 0, 0, 0, 0 },
22251 { 0, 0, 0, 0, 0, 0, 0, 6, -9, 0, 0, 0, 0, 0 },
22252 { 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0 },
22253 { 0, 0, 0, 0, 0, 0, 0, 3, 0, -4, 0, 0, 0, 0 },
22254
22255 /* 541-550 */
22256 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -2, -2 },
22257 { 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 2 },
22258 { 2, 0, 0, -2, 0, 0, 0, -4, 4, 0, 0, 0, 0, 0 },
22259 { 2, 0, 0, -2, 0, 0, 0, -2, 0, 2, 2, 0, 0, 0 },
22260 { 1, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0 },
22261 { 1, 0, 0, 0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0 },
22262 { 1, 0, 0, 0, 0, 0, -3, 3, 0, 0, 0, 0, 0, 0 },
22263 { 1, 0, 0, -2, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0 },
22264 { 1, 0, 0, -2, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0 },
22265 { 1, 0, 0, -2, 0, 0, 0, -4, 8, -3, 0, 0, 0, 0 },
22266
22267 /* 551-560 */
22268 { 1, 0, 0, -2, 0, 0, -2, 2, 0, 0, 0, 0, 0, 0 },
22269 { 0, 0, 2, -2, 0, 0, -4, 4, 0, 0, 0, 0, 0, 0 },
22270 { 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
22271 { 0, 0, 1, -1, 0, 0, 3, -6, 0, 0, 0, 0, 0, 0 },
22272 { 0, 0, 1, -1, 0, 0, 0, -2, 2, 0, 0, 0, 0, 0 },
22273 { 0, 0, 1, -1, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0 },
22274 { 0, 0, 1, -1, 0, 0, 0, -1, 0, 0, 1, 0, 0, 0 },
22275 { 0, 0, 1, -1, 0, 0, -4, 5, 0, 0, 0, 0, 0, 0 },
22276 { 0, 0, 1, -1, 0, 0, -3, 4, 0, 0, 0, 0, 0, 0 },
22277 { 0, 0, 0, 2, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0 },
22278
22279 /* 561-570 */
22280 { 0, 0, 0, 0, 0, 0, 8, -9, 0, 0, 0, 0, 0, 0 },
22281 { 0, 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, 0, 0 },
22282 { 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0 },
22283 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0 },
22284 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0 },
22285 { 2, 0, -2, -2, -2, 0, 0, -2, 0, 2, 0, 0, 0, 0 },
22286 { 1, 0, 0, 0, 1, 0,-10, 3, 0, 0, 0, 0, 0, 0 },
22287 { 1, 0, 0, 0, -1, 0,-10, 3, 0, 0, 0, 0, 0, 0 },
22288 { 0, 0, 2, 0, 2, 0, 2, -3, 0, 0, 0, 0, 0, 0 },
22289 { 0, 0, 2, 0, 2, 0, 2, -2, 0, 0, 0, 0, 0, 0 },
22290
22291 /* 571-580 */
22292 { 0, 0, 2, 0, 2, 0, -2, 3, 0, 0, 0, 0, 0, 0 },
22293 { 0, 0, 2, 0, 2, 0, -2, 2, 0, 0, 0, 0, 0, 0 },
22294 { 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0 },
22295 { 0, 0, 0, 0, 1, 0, 0, -1, 0, 2, 0, 0, 0, 0 },
22296 { 2, 0, 2, -2, 2, 0, 0, -2, 0, 3, 0, 0, 0, 0 },
22297 { 2, 0, 1, -3, 1, 0, -6, 7, 0, 0, 0, 0, 0, 0 },
22298 { 2, 0, 0, -2, 0, 0, 2, -5, 0, 0, 0, 0, 0, 0 },
22299 { 2, 0, 0, -2, 0, 0, 0, -2, 0, 5, -5, 0, 0, 0 },
22300 { 2, 0, 0, -2, 0, 0, 0, -2, 0, 1, 5, 0, 0, 0 },
22301 { 2, 0, 0, -2, 0, 0, 0, -2, 0, 0, 5, 0, 0, 0 },
22302
22303 /* 581-590 */
22304 { 2, 0, 0, -2, 0, 0, 0, -2, 0, 0, 2, 0, 0, 0 },
22305 { 2, 0, 0, -2, 0, 0, -4, 4, 0, 0, 0, 0, 0, 0 },
22306 { 2, 0, -2, 0, -2, 0, 0, 5, -9, 0, 0, 0, 0, 0 },
22307 { 2, 0, -1, -1, 0, 0, 0, -1, 0, 3, 0, 0, 0, 0 },
22308 { 1, 0, 2, 0, 2, 0, 1, -1, 0, 0, 0, 0, 0, 0 },
22309 { 1, 0, 2, 0, 2, 0, 0, 4, -8, 3, 0, 0, 0, 0 },
22310 { 1, 0, 2, 0, 2, 0, 0, -4, 8, -3, 0, 0, 0, 0 },
22311 { 1, 0, 2, 0, 2, 0, -1, 1, 0, 0, 0, 0, 0, 0 },
22312 { 1, 0, 2, -2, 2, 0, -3, 3, 0, 0, 0, 0, 0, 0 },
22313 { 1, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0 },
22314
22315 /* 591-600 */
22316 { 1, 0, 0, 0, 0, 0, 0, -2, 0, 3, 0, 0, 0, 0 },
22317 { 1, 0, 0, -2, 0, 0, 0, 2, 0, -2, 0, 0, 0, 0 },
22318 { 1, 0, -2, -2, -2, 0, 0, 1, 0, -1, 0, 0, 0, 0 },
22319 { 1, 0, -1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
22320 { 1, 0, -1, -1, 0, 0, 0, 8,-15, 0, 0, 0, 0, 0 },
22321 { 0, 0, 2, 2, 2, 0, 0, 2, 0, -2, 0, 0, 0, 0 },
22322 { 0, 0, 2, -2, 1, 0, 1, -1, 0, 0, 0, 0, 0, 0 },
22323 { 0, 0, 2, -2, 1, 0, 0, -2, 0, 1, 0, 0, 0, 0 },
22324 { 0, 0, 2, -2, 1, 0, 0,-10, 15, 0, 0, 0, 0, 0 },
22325 { 0, 0, 2, -2, 0, -1, 0, 2, 0, 0, 0, 0, 0, 0 },
22326
22327 /* 601-610 */
22328 { 0, 0, 1, -1, 2, 0, 0, -1, 0, 0, -1, 0, 0, 0 },
22329 { 0, 0, 1, -1, 2, 0, -3, 4, 0, 0, 0, 0, 0, 0 },
22330 { 0, 0, 1, -1, 1, 0, -4, 6, 0, 0, 0, 0, 0, 0 },
22331 { 0, 0, 1, -1, 1, 0, -1, 2, 0, 0, 0, 0, 0, 0 },
22332 { 0, 0, 1, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
22333 { 0, 0, 1, -1, 0, 0, 0, -1, 0, 0, -2, 0, 0, 0 },
22334 { 0, 0, 1, -1, 0, 0, -2, 2, 0, 0, 0, 0, 0, 0 },
22335 { 0, 0, 1, -1, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0 },
22336 { 0, 0, 1, -1, -1, 0, -5, 7, 0, 0, 0, 0, 0, 0 },
22337 { 0, 0, 0, 2, 0, 0, 0, 2, 0, -2, 0, 0, 0, 0 },
22338
22339 /* 611-620 */
22340 { 0, 0, 0, 2, 0, 0, -2, 2, 0, 0, 0, 0, 0, 0 },
22341 { 0, 0, 0, 0, 2, 0, -3, 5, 0, 0, 0, 0, 0, 0 },
22342 { 0, 0, 0, 0, 1, 0, -1, 2, 0, 0, 0, 0, 0, 0 },
22343 { 0, 0, 0, 0, 0, 0, 9,-13, 0, 0, 0, 0, 0, -2 },
22344 { 0, 0, 0, 0, 0, 0, 8,-14, 0, 0, 0, 0, 0, -2 },
22345 { 0, 0, 0, 0, 0, 0, 8,-11, 0, 0, 0, 0, 0, -1 },
22346 { 0, 0, 0, 0, 0, 0, 6, -9, 0, 0, 0, 0, 0, 0 },
22347 { 0, 0, 0, 0, 0, 0, 6, -8, 0, 0, 0, 0, 0, 0 },
22348 { 0, 0, 0, 0, 0, 0, 6, -7, 0, 0, 0, 0, 0, -1 },
22349 { 0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, -2 },
22350
22351 /* 621-630 */
22352 { 0, 0, 0, 0, 0, 0, 5, -6, -4, 0, 0, 0, 0, -2 },
22353 { 0, 0, 0, 0, 0, 0, 5, -4, 0, 0, 0, 0, 0, 2 },
22354 { 0, 0, 0, 0, 0, 0, 4, -8, 0, 0, 0, 0, 0, -2 },
22355 { 0, 0, 0, 0, 0, 0, 4, -5, 0, 0, 0, 0, 0, 0 },
22356 { 0, 0, 0, 0, 0, 0, 3, -3, 0, 2, 0, 0, 0, 2 },
22357 { 0, 0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 0, 0 },
22358 { 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0 },
22359 { 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, -2 },
22360 { 0, 0, 0, 0, 0, 0, 0, 7,-12, 0, 0, 0, 0, -2 },
22361 { 0, 0, 0, 0, 0, 0, 0, 6, -9, 0, 0, 0, 0, -2 },
22362
22363 /* 631-640 */
22364 { 0, 0, 0, 0, 0, 0, 0, 6, -8, 1, 5, 0, 0, 2 },
22365 { 0, 0, 0, 0, 0, 0, 0, 6, -4, 0, 0, 0, 0, 2 },
22366 { 0, 0, 0, 0, 0, 0, 0, 6,-10, 0, 0, 0, 0, 0 },
22367 { 0, 0, 0, 0, 0, 0, 0, 5, 0, -4, 0, 0, 0, 2 },
22368 { 0, 0, 0, 0, 0, 0, 0, 5, -9, 0, 0, 0, 0, -1 },
22369 { 0, 0, 0, 0, 0, 0, 0, 5, -8, 3, 0, 0, 0, 2 },
22370 { 0, 0, 0, 0, 0, 0, 0, 5, -7, 0, 0, 0, 0, -2 },
22371 { 0, 0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0 },
22372 { 0, 0, 0, 0, 0, 0, 0, 5,-16, 4, 5, 0, 0, -2 },
22373 { 0, 0, 0, 0, 0, 0, 0, 5,-13, 0, 0, 0, 0, -2 },
22374
22375 /* 641-650 */
22376 { 0, 0, 0, 0, 0, 0, 0, 3, 0, -5, 0, 0, 0, -2 },
22377 { 0, 0, 0, 0, 0, 0, 0, 3, -9, 0, 0, 0, 0, -2 },
22378 { 0, 0, 0, 0, 0, 0, 0, 3, -7, 0, 0, 0, 0, -2 },
22379 { 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2 },
22380 { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, -3, 0, 0, 0 },
22381 { 0, 0, 0, 0, 0, 0, 0, 2, -8, 1, 5, 0, 0, -2 },
22382 { 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, -5, 0, 0, 0 },
22383 { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 2 },
22384 { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -3, 0, 0, 0 },
22385 { 0, 0, 0, 0, 0, 0, 0, 1, 0, -3, 5, 0, 0, 0 },
22386
22387 /* 651-NFPL */
22388 { 0, 0, 0, 0, 0, 0, 0, 1, -3, 0, 0, 0, 0, 0 },
22389 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -6, 3, 0, -2 },
22390 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0 },
22391 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
22392 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2 },
22393 { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 }
22394 };
22395
22396 /**
22397 *
22398 * Time scale transformation: Terrestrial Time, TT, to International
22399 * Atomic Time, TAI.
22400 *
22401 * <p>This function is derived from the International Astronomical Union's
22402 * SOFA (Standards of Fundamental Astronomy) software collection.
22403 *
22404 *<p>Status: canonical.
22405 *
22406 *<!-- Given: -->
22407 * @param tt1 double TT as a 2-part Julian Date
22408 * @param tt2 double TT as a 2-part Julian Date
22409 *
22410 *<!-- Returned:-->
22411 * @return TAI as a 2-part Julian Date
22412 *
22413 * Returned (function value):
22414 * int status: 0 = OK
22415 *
22416 * Note:
22417 *
22418 * tt1+tt2 is Julian Date, apportioned in any convenient way between
22419 * the two arguments, for example where tt1 is the Julian Day Number
22420 * and tt2 is the fraction of a day. The returned tai1,tai2 follow
22421 * suit.
22422 *
22423 *<p>References:
22424 *
22425 * McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
22426 * IERS Technical Note No. 32, BKG (2004)
22427 *
22428 * Explanatory Supplement to the Astronomical Almanac,
22429 * P. Kenneth Seidelmann (ed), University Science Books (1992)
22430 *
22431 *@version 2010 May 13
22432 *
22433 *@since SOFA release 2010-12-01
22434 *
22435 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
22436 */
22437 public static JulianDate jauTttai(double tt1, double tt2)
22438 {
22439 double tai1, tai2;
22440 /* TT minus TAI (days). */
22441 final double dtat = TTMTAI / 86400.0;
22442
22443
22444 /* Result, safeguarding precision. */
22445 if ( abs(tt1) > abs(tt2) ) {
22446 tai1 = tt1;
22447 tai2 = tt2 - dtat;
22448 } else {
22449 tai1 = tt1 - dtat;
22450 tai2 = tt2;
22451 }
22452
22453 return new JulianDate(tai1, tai2);
22454
22455 };
22456
22457 /**
22458 *
22459 * Time scale transformation: Terrestrial Time, TT, to Geocentric
22460 * Coordinate Time, TCG.
22461 *
22462 * <p>This function is derived from the International Astronomical Union's
22463 * SOFA (Standards of Fundamental Astronomy) software collection.
22464 *
22465 *<p>Status: canonical.
22466 *
22467 *<!-- Given: -->
22468 * @param tt1 double TT as a 2-part Julian Date
22469 * @param tt2 double TT as a 2-part Julian Date
22470 *
22471 *<!-- Returned:-->
22472 * @return TCG as a 2-part Julian Date
22473 *
22474 * Returned (function value):
22475 * int status: 0 = OK
22476 *
22477 * Note:
22478 *
22479 * tt1+tt2 is Julian Date, apportioned in any convenient way between
22480 * the two arguments, for example where tt1 is the Julian Day Number
22481 * and tt2 is the fraction of a day. The returned tcg1,tcg2 follow
22482 * suit.
22483 *
22484 *<p>References:
22485 *
22486 * McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
22487 * IERS Technical Note No. 32, BKG (2004)
22488 *
22489 * IAU 2000 Resolution B1.9
22490 *
22491 *@version 2010 May 13
22492 *
22493 *@since SOFA release 2010-12-01
22494 *
22495 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
22496 */
22497 public static JulianDate jauTttcg(double tt1, double tt2)
22498
22499 {
22500 double tcg1, tcg2;
22501
22502 /* 1977 Jan 1 00:00:32.184 TT, as MJD */
22503 final double t77t = DJM77 + TTMTAI/DAYSEC;
22504
22505 /* TT to TCG rate */
22506 final double elgg = ELG/(1.0-ELG);
22507
22508
22509 /* Result, safeguarding precision. */
22510 if ( abs(tt1) > abs(tt2) ) {
22511 tcg1 = tt1;
22512 tcg2 = tt2 + ( ( tt1 - DJM0 ) + ( tt2 - t77t ) ) * elgg;
22513 } else {
22514 tcg1 = tt1 + ( ( tt2 - DJM0 ) + ( tt1 - t77t ) ) * elgg;
22515 tcg2 = tt2;
22516 }
22517
22518 return new JulianDate(tcg1, tcg2);
22519
22520 };
22521
22522 /**
22523 *
22524 * Time scale transformation: Terrestrial Time, TT, to Barycentric
22525 * Dynamical Time, TDB.
22526 *
22527 * <p>This function is derived from the International Astronomical Union's
22528 * SOFA (Standards of Fundamental Astronomy) software collection.
22529 *
22530 *<p>Status: canonical.
22531 *
22532 *<!-- Given: -->
22533 * @param tt1 double TT as a 2-part Julian Date
22534 * @param tt2 double TT as a 2-part Julian Date
22535 * @param dtr double TDB-TT in seconds
22536 *
22537 *<!-- Returned:-->
22538 * @return TDB as a 2-part Julian Date
22539 *
22540 * Returned (function value):
22541 * int status: 0 = OK
22542 *
22543 *<p>Notes:
22544 *
22545 * 1 tt1+tt2 is Julian Date, apportioned in any convenient way between
22546 * the two arguments, for example where tt1 is the Julian Day Number
22547 * and tt2 is the fraction of a day. The returned tdb1,tdb2 follow
22548 * suit.
22549 *
22550 * 2 The argument dtr represents the quasi-periodic component of the
22551 * GR transformation between TT and TCB. It is dependent upon the
22552 * adopted solar-system ephemeris, and can be obtained by numerical
22553 * integration, by interrogating a precomputed time ephemeris or by
22554 * evaluating a model such as that implemented in the SOFA function
22555 * jauDtdb. The quantity is dominated by an annual term of 1.7 ms
22556 * amplitude.
22557 *
22558 * 3 TDB is essentially the same as Teph, the time argument for the JPL
22559 * solar system ephemerides.
22560 *
22561 *<p>References:
22562 *
22563 * McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
22564 * IERS Technical Note No. 32, BKG (2004)
22565 *
22566 * IAU 2006 Resolution 3
22567 *
22568 *@version 2010 May 13
22569 *
22570 *@since SOFA release 2010-12-01
22571 *
22572 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
22573 */
22574 public static JulianDate jauTttdb(double tt1, double tt2, double dtr)
22575 {
22576
22577 double tdb1, tdb2;
22578 double dtrd;
22579
22580
22581 /* Result, safeguarding precision. */
22582 dtrd = dtr / DAYSEC;
22583 if ( abs(tt1) > abs(tt2) ) {
22584 tdb1 = tt1;
22585 tdb2 = tt2 + dtrd;
22586 } else {
22587 tdb1 = tt1 + dtrd;
22588 tdb2 = tt2;
22589 }
22590
22591 return new JulianDate(tdb1, tdb2);
22592
22593 };
22594
22595 /**
22596 *
22597 * Time scale transformation: Terrestrial Time, TT, to Universal Time,
22598 * UT1.
22599 *
22600 * <p>This function is derived from the International Astronomical Union's
22601 * SOFA (Standards of Fundamental Astronomy) software collection.
22602 *
22603 *<p>Status: canonical.
22604 *
22605 *<!-- Given: -->
22606 * @param tt1 double TT as a 2-part Julian Date
22607 * @param tt2 double TT as a 2-part Julian Date
22608 * @param dt double TT-UT1 in seconds
22609 *
22610 *<!-- Returned:-->
22611 * @return UT1 as a 2-part Julian Date
22612 *
22613 * Returned (function value):
22614 * int status: 0 = OK
22615 *
22616 *<p>Notes:
22617 *
22618 * 1 tt1+tt2 is Julian Date, apportioned in any convenient way between
22619 * the two arguments, for example where tt1 is the Julian Day Number
22620 * and tt2 is the fraction of a day. The returned ut11,ut12 follow
22621 * suit.
22622 *
22623 * 2 The argument dt is classical Delta T.
22624 *
22625 * Reference:
22626 *
22627 * Explanatory Supplement to the Astronomical Almanac,
22628 * P. Kenneth Seidelmann (ed), University Science Books (1992)
22629 *
22630 *@version 2010 May 16
22631 *
22632 *@since SOFA release 2010-12-01
22633 *
22634 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
22635 */
22636 public static JulianDate jauTtut1(double tt1, double tt2, double dt)
22637
22638 {
22639
22640 double ut11, ut12;
22641 double dtd;
22642
22643
22644 /* Result, safeguarding precision. */
22645 dtd = dt / DAYSEC;
22646 if ( abs(tt1) > abs(tt2) ) {
22647 ut11 = tt1;
22648 ut12 = tt2 - dtd;
22649 } else {
22650 ut11 = tt1 - dtd;
22651 ut12 = tt2;
22652 }
22653
22654 return new JulianDate(ut11, ut12);
22655 };
22656
22657 /**
22658 *
22659 * Time scale transformation: Universal Time, UT1, to International
22660 * Atomic Time, TAI.
22661 *
22662 * <p>This function is derived from the International Astronomical Union's
22663 * SOFA (Standards of Fundamental Astronomy) software collection.
22664 *
22665 *<p>Status: canonical.
22666 *
22667 *<!-- Given: -->
22668 * @param ut11 double UT1 as a 2-part Julian Date
22669 * @param ut12 double UT1 as a 2-part Julian Date
22670 * @param dta double UT1-TAI in seconds
22671 *
22672 *<!-- Returned:-->
22673 * @return TAI as a 2-part Julian Date
22674 *
22675 * Returned (function value):
22676 * int status: 0 = OK
22677 *
22678 *<p>Notes:
22679 *
22680 * 1 ut11+ut12 is Julian Date, apportioned in any convenient way
22681 * between the two arguments, for example where ut11 is the Julian
22682 * Day Number and ut12 is the fraction of a day. The returned
22683 * TAI1,TAI2 follow suit.
22684 *
22685 * 2 The argument dta, i.e. UT1-TAI, is an observed quantity, and is
22686 * available from IERS tabulations.
22687 *
22688 * Reference:
22689 *
22690 * Explanatory Supplement to the Astronomical Almanac,
22691 * P. Kenneth Seidelmann (ed), University Science Books (1992)
22692 *
22693 *@version 2010 May 16
22694 *
22695 *@since SOFA release 2010-12-01
22696 *
22697 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
22698 */
22699 public static JulianDate jauUt1tai(double ut11, double ut12, double dta )
22700
22701 {
22702 double tai1, tai2;
22703 double dtad;
22704
22705
22706 /* Result, safeguarding precision. */
22707 dtad = dta / DAYSEC;
22708 if ( abs(ut11) > abs(ut12) ) {
22709 tai1 = ut11;
22710 tai2 = ut12 - dtad;
22711 } else {
22712 tai1 = ut11 - dtad;
22713 tai2 = ut12;
22714 }
22715 return new JulianDate(tai1, tai2);
22716
22717 };
22718
22719 /**
22720 *
22721 * Time scale transformation: Universal Time, UT1, to Terrestrial
22722 * Time, TT.
22723 *
22724 * <p>This function is derived from the International Astronomical Union's
22725 * SOFA (Standards of Fundamental Astronomy) software collection.
22726 *
22727 *<p>Status: canonical.
22728 *
22729 *<!-- Given: -->
22730 * @param ut11 double UT1 as a 2-part Julian Date
22731 * @param ut12 double UT1 as a 2-part Julian Date
22732 * @param dt double TT-UT1 in seconds
22733 *
22734 *<!-- Returned:-->
22735 * @return TAI as a 2-part Julian Date
22736 *
22737 * Returned (function value):
22738 * int status: 0 = OK
22739 *
22740 *<p>Notes:
22741 *
22742 * 1 ut11+ut12 is Julian Date, apportioned in any convenient way
22743 * between the two arguments, for example where ut11 is the Julian
22744 * Day Number and ut12 is the fraction of a day. The returned
22745 * tt1,tt2 follow suit.
22746 *
22747 * 2 The argument dt is classical Delta T.
22748 *
22749 * Reference:
22750 *
22751 * Explanatory Supplement to the Astronomical Almanac,
22752 * P. Kenneth Seidelmann (ed), University Science Books (1992)
22753 *
22754 *@version 2010 May 16
22755 *
22756 *@since SOFA release 2010-12-01
22757 *
22758 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
22759 */
22760 public static JulianDate jauUt1tt(double ut11, double ut12, double dt)
22761 {
22762
22763 double tt1, tt2;
22764 double dtd;
22765
22766
22767 /* Result, safeguarding precision. */
22768 dtd = dt / DAYSEC;
22769 if ( abs(ut11) > abs(ut12) ) {
22770 tt1 = ut11;
22771 tt2 = ut12 + dtd;
22772 } else {
22773 tt1 = ut11 + dtd;
22774 tt2 = ut12;
22775 }
22776
22777 return new JulianDate(tt1, tt2);
22778
22779 };
22780
22781 /**
22782 *
22783 * Time scale transformation: Universal Time, UT1, to Coordinated
22784 * Universal Time, UTC.
22785 *
22786 * <p>This function is derived from the International Astronomical Union's
22787 * SOFA (Standards of Fundamental Astronomy) software collection.
22788 *
22789 *<p>Status: canonical.
22790 *
22791 *<!-- Given: -->
22792 * @param ut11 double UT1 as a 2-part Julian Date (Note 1)
22793 * @param ut12 double UT1 as a 2-part Julian Date (Note 1)
22794 * @param dut1 double Delta UT1: UT1-UTC in seconds (Note 2)
22795 *
22796 *<!-- Returned:-->
22797 * @return JulianDate UTC as a 2-part quasi Julian Date (Notes 3,4)
22798 *
22799 * Returned (function value):
22800 * int status: +1 = dubious year (Note 5)
22801 * 0 = OK
22802 * -1 = unacceptable date
22803 *
22804 *<p>Notes:
22805 *<ol>
22806 * <li> ut11+ut12 is Julian Date, apportioned in any convenient way
22807 * between the two arguments, for example where ut11 is the Julian
22808 * Day Number and ut12 is the fraction of a day. The returned utc1
22809 * and utc2 form an analogous pair, except that a special convention
22810 * is used, to deal with the problem of leap seconds - see Note 3.
22811 *
22812 * <li> Delta UT1 can be obtained from tabulations provided by the
22813 * International Earth Rotation and Reference Systems Service. The
22814 * value changes abruptly by 1s at a leap second; however, close to
22815 * a leap second the algorithm used here is tolerant of the "wrong"
22816 * choice of value being made.
22817 *
22818 * <li> JD cannot unambiguously represent UTC during a leap second unless
22819 * special measures are taken. The convention in the present
22820 * function is that the returned quasi JD day UTC1+UTC2 represents
22821 * UTC days whether the length is 86399, 86400 or 86401 SI seconds.
22822 *
22823 * <li> The function jauD2dtf can be used to transform the UTC quasi-JD
22824 * into calendar date and clock time, including UTC leap second
22825 * handling.
22826 *
22827 * <li> The warning status "dubious year" flags UTCs that predate the
22828 * introduction of the time scale and that are too far in the future
22829 * to be trusted. See jauDat for further details.
22830 *</ol>
22831 * Called:
22832 * <ul>
22833 * <li>{@link #jauJd2cal} JD to Gregorian calendar
22834 * <li>{@link #jauDat} delta(AT) = TAI-UTC
22835 * <li>{@link #jauCal2jd} Gregorian calendar to JD
22836 *</ul>
22837 *<p>References:
22838 *
22839 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
22840 * IERS Technical Note No. 32, BKG (2004)
22841 *
22842 * <p>Explanatory Supplement to the Astronomical Almanac,
22843 * P. Kenneth Seidelmann (ed), University Science Books (1992)
22844 *
22845 *@version 2010 May 16
22846 *
22847 *@since SOFA release 2010-12-01
22848 *
22849 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
22850 * @throws JSOFAIllegalParameter
22851 * @throws JSOFAInternalError an internal error has occured
22852 */
22853 public static JulianDate jauUt1utc(double ut11, double ut12, double dut1) throws JSOFAIllegalParameter, JSOFAInternalError
22854
22855 {
22856
22857 double utc1, utc2;
22858 boolean big1;
22859 int i;
22860 double duts, u1, u2, d1, dats1, d2, fd, dats2, ddats, us1, us2, du;
22861
22862
22863 /* UT1-UTC in seconds. */
22864 duts = dut1;
22865
22866 /* Put the two parts of the UT1 into big-first order. */
22867 big1 = ( abs(ut11) >= abs(ut12) );
22868 if ( big1 ) {
22869 u1 = ut11;
22870 u2 = ut12;
22871 } else {
22872 u1 = ut12;
22873 u2 = ut11;
22874 }
22875
22876 /* See if the UT1 can possibly be in a leap-second day. */
22877 d1 = u1;
22878 dats1 = 0;
22879 for ( i = -1; i <= 3; i++ ) {
22880 d2 = u2 + (double) i;
22881 Calendar dt = jauJd2cal(d1, d2 );
22882 dats2 = jauDat(dt.iy, dt.im, dt.id, 0.0);
22883 if ( i == - 1 ) dats1 = dats2;
22884 ddats = dats2 - dats1;
22885 if ( abs(ddats) >= 0.5 ) {
22886
22887 /* Yes, leap second nearby: ensure UT1-UTC is "before" value. */
22888 if ( ddats * duts >= 0 ) duts -= ddats;
22889
22890 /* UT1 for the start of the UTC day that ends in a leap. */
22891 JulianDate jd = jauCal2jd(dt.iy, dt.im, dt.id );
22892 d1 = jd.djm0; d2 = jd.djm1;
22893 us1 = d1;
22894 us2 = d2 - 1.0 + duts/DAYSEC;
22895
22896 /* Is the UT1 after this point? */
22897 du = u1 - us1;
22898 du += u2 - us2;
22899 if ( du > 0 ) {
22900
22901 /* Yes: fraction of the current UTC day that has elapsed. */
22902 fd = du * DAYSEC / ( DAYSEC + ddats );
22903
22904 /* Ramp UT1-UTC to bring about SOFA's JD(UTC) convention. */
22905 duts += ddats * ( fd <= 1.0 ? fd : 1.0 );
22906 }
22907
22908 /* Done. */
22909 break;
22910 }
22911 dats1 = dats2;
22912 }
22913
22914 /* Subtract the (possibly adjusted) UT1-UTC from UT1 to give UTC. */
22915 u2 -= duts / DAYSEC;
22916
22917 /* Result, safeguarding precision. */
22918 if ( big1 ) {
22919 utc1 = u1;
22920 utc2 = u2;
22921 } else {
22922 utc1 = u2;
22923 utc2 = u1;
22924 }
22925
22926 /* FIXME Status. */
22927 return new JulianDate(utc1, utc2);
22928
22929 };
22930
22931 /**
22932 *
22933 * Time scale transformation: Coordinated Universal Time, UTC, to
22934 * International Atomic Time, TAI.
22935 *
22936 * <p>This function is derived from the International Astronomical Union's
22937 * SOFA (Standards of Fundamental Astronomy) software collection.
22938 *
22939 *<p>Status: canonical.
22940 *
22941 *<!-- Given: -->
22942 * @param utc1 double UTC as a 2-part quasi Julian Date (Notes 1-4)
22943 * @param utc2 double UTC as a 2-part quasi Julian Date (Notes 1-4)
22944 *
22945 *<!-- Returned:-->
22946 * @return JulianDate TAI as a 2-part Julian Date (Note 5)
22947 *
22948 * Returned (function value):
22949 * int status: +1 = dubious year (Note 3)
22950 * 0 = OK
22951 * -1 = unacceptable date
22952 *
22953 *<p>Notes:
22954 *<ol>
22955 * <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
22956 * convenient way between the two arguments, for example where utc1
22957 * is the Julian Day Number and utc2 is the fraction of a day.
22958 *
22959 * <li> JD cannot unambiguously represent UTC during a leap second unless
22960 * special measures are taken. The convention in the present
22961 * function is that the JD day represents UTC days whether the
22962 * length is 86399, 86400 or 86401 SI seconds.
22963 *
22964 * <li> The warning status "dubious year" flags UTCs that predate the
22965 * introduction of the time scale and that are too far in the future
22966 * to be trusted. See jauDat for further details.
22967 *
22968 * <li> The function jauDtf2d converts from calendar date and time of day
22969 * into 2-part Julian Date, and in the case of UTC implements the
22970 * leap-second-ambiguity convention described above.
22971 *
22972 * <li> The returned TAI1,TAI2 are such that their sum is the TAI Julian
22973 * Date.
22974 *</ol>
22975 * Called:<ul>
22976 * <li>{@link #jauJd2cal} JD to Gregorian calendar
22977 * <li>{@link #jauDat} delta(AT) = TAI-UTC
22978 * <li>{@link #jauCal2jd} Gregorian calendar to JD
22979 *</ul>
22980 *<p>References:
22981 *
22982 * McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
22983 * IERS Technical Note No. 32, BKG (2004)
22984 *
22985 * Explanatory Supplement to the Astronomical Almanac,
22986 * P. Kenneth Seidelmann (ed), University Science Books (1992)
22987 *
22988 *@version 2010 September 10
22989 *
22990 *@since SOFA release 2010-12-01
22991 *
22992 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
22993 * @throws JSOFAInternalError an internal error has occured
22994 * @throws JSOFAIllegalParameter
22995 *
22996 */
22997 public static JulianDate jauUtctai(double utc1, double utc2) throws JSOFAIllegalParameter, JSOFAInternalError
22998
22999 {
23000 double tai1, tai2;
23001 boolean big1;
23002 double u1, u2, dats, datst, ddat, a2, fd;
23003
23004
23005 /* Put the two parts of the UTC into big-first order. */
23006 big1 = ( abs(utc1) >= abs(utc2) );
23007 if ( big1 ) {
23008 u1 = utc1;
23009 u2 = utc2;
23010 } else {
23011 u1 = utc2;
23012 u2 = utc1;
23013 }
23014
23015 /* Get TAI-UTC now. */
23016 Calendar dt = jauJd2cal(u1, u2 );
23017 dats = jauDat(dt.iy, dt.im, dt.id, dt.fd);
23018 // if ( js < 0 ) return -1;
23019 fd = dt.fd;
23020 /* Get TAI-UTC tomorrow. */
23021 Calendar dtt = jauJd2cal(u1+1.5, u2-fd );
23022 datst = jauDat(dtt.iy, dtt.im, dtt.id, dtt.fd);
23023 // if ( js < 0 ) return -1;
23024
23025 /* If today ends in a leap second, scale the fraction into SI days. */
23026 ddat = datst - dats;
23027 if ( abs(ddat) > 0.5 ) fd += fd * ddat / DAYSEC;
23028
23029 /* Today's calendar date to 2-part JD. */
23030 JulianDate jd = jauCal2jd(dt.iy, dt.im, dt.id ) ;
23031
23032 /* Assemble the TAI result, preserving the UTC split and order. */
23033 a2 = jd.djm0 - u1;
23034 a2 += jd.djm1;
23035 a2 += fd + dats / DAYSEC;
23036 if ( big1 ) {
23037 tai1 = u1;
23038 tai2 = a2;
23039 } else {
23040 tai1 = a2;
23041 tai2 = u1;
23042 }
23043
23044 /* FIXME Status. */
23045 return new JulianDate(tai1, tai2);
23046
23047 };
23048
23049 /**
23050 *
23051 * Time scale transformation: Coordinated Universal Time, UTC, to
23052 * Universal Time, UT1.
23053 *
23054 * <p>This function is derived from the International Astronomical Union's
23055 * SOFA (Standards of Fundamental Astronomy) software collection.
23056 *
23057 *<p>Status: canonical.
23058 *
23059 *<!-- Given: -->
23060 * @param utc1 double UTC as a 2-part quasi Julian Date (Notes 1-4)
23061 * @param utc2 double UTC as a 2-part quasi Julian Date (Notes 1-4)
23062 * @param dut1 double Delta UT1 = UT1-UTC in seconds (Note 5)
23063 *
23064 *<!-- Returned:-->
23065 * @return UT1 as a 2-part Julian Date (Note 6)
23066 *
23067 * Returned (function value):
23068 * int status: +1 = dubious year (Note 7)
23069 * 0 = OK
23070 * -1 = unacceptable date
23071 *
23072 *<p>Notes:
23073 *<ol>
23074 * <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
23075 * convenient way between the two arguments, for example where utc1
23076 * is the Julian Day Number and utc2 is the fraction of a day.
23077 *
23078 * <li> JD cannot unambiguously represent UTC during a leap second unless
23079 * special measures are taken. The convention in the present
23080 * function is that the JD day represents UTC days whether the
23081 * length is 86399, 86400 or 86401 SI seconds.
23082 *
23083 * <li> The warning status "dubious year" flags UTCs that predate the
23084 * introduction of the time scale and that are too far in the future
23085 * to be trusted. See jauDat for further details.
23086 *
23087 * <li> The function jauDtf2d converts from calendar date and time of
23088 * day into 2-part Julian Date, and in the case of UTC implements
23089 * the leap-second-ambiguity convention described above.
23090 *
23091 * <li> Delta UT1 can be obtained from tabulations provided by the
23092 * International Earth Rotation and Reference Systems Service. It
23093 * It is the caller's responsibility to supply a DUT argument
23094 * containing the UT1-UTC value that matches the given UTC.
23095 *
23096 * <li> The returned ut11,ut12 are such that their sum is the UT1 Julian
23097 * Date.
23098 *
23099 * <li> The warning status "dubious year" flags UTCs that predate the
23100 * introduction of the time scale and that are too far in the future
23101 * to be trusted. See jauDat for further details.
23102 *</ol>
23103 *<p>References:
23104 *
23105 * McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
23106 * IERS Technical Note No. 32, BKG (2004)
23107 *
23108 * Explanatory Supplement to the Astronomical Almanac,
23109 * P. Kenneth Seidelmann (ed), University Science Books (1992)
23110 *
23111 * Called:<ul>
23112 * <li>{@link #jauJd2cal} JD to Gregorian calendar
23113 * <li>{@link #jauDat} delta(AT) = TAI-UTC
23114 * <li>{@link #jauUtctai} UTC to TAI
23115 * <li>{@link #jauTaiut1} TAI to UT1
23116 *</ul>
23117 *@version 2010 May 16
23118 *
23119 *@since SOFA release 2010-12-01
23120 *
23121 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
23122 * @throws JSOFAInternalError an internal error has occured
23123 * @throws JSOFAIllegalParameter
23124 */
23125 public static JulianDate jauUtcut1(double utc1, double utc2, double dut1) throws JSOFAIllegalParameter, JSOFAInternalError
23126 {
23127
23128
23129 double dta;
23130 /* Look up TAI-UTC. */
23131 Calendar dt = jauJd2cal(utc1, utc2) ;
23132 double dat = jauDat ( dt.iy, dt.im, dt.id, 0.0 );
23133
23134
23135 /* Form UT1-TAI. */
23136 dta = dut1 - dat;
23137
23138 /* UTC to TAI to UT1. */
23139 JulianDate tai = jauUtctai(utc1, utc2);
23140 return jauTaiut1(tai.djm0, tai.djm1, dta) ;
23141
23142 };
23143
23144
23145 public static CelestialIntermediatePole jauXy06(double date1, double date2)
23146 /**
23147 * X,Y coordinates of celestial intermediate pole from series based
23148 * on IAU 2006 precession and IAU 2000A nutation.
23149 *
23150 *<p>This function is derived from the International Astronomical Union's
23151 * SOFA (Standards Of Fundamental Astronomy) software collection.
23152 *
23153 *<p>Status: canonical model.
23154 *
23155 *<!-- Given: -->
23156 * @param date1 double TT as a 2-part Julian Date (Note 1)
23157 * @param date2 double TT as a 2-part Julian Date (Note 1)
23158 *
23159 *<!-- Returned: -->
23160 * @return CIP X,Y coordinates (Note 2)
23161 *
23162 * <p>Notes:
23163 * <ol>
23164 *
23165 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
23166 * convenient way between the two arguments. For example,
23167 * JD(TT)=2450123.7 could be expressed in any of these ways,
23168 * among others:
23169 *<pre>
23170 * date1 date2
23171 *
23172 * 2450123.7 0.0 (JD method)
23173 * 2451545.0 -1421.3 (J2000 method)
23174 * 2400000.5 50123.2 (MJD method)
23175 * 2450123.5 0.2 (date & time method)
23176 *</pre>
23177 * The JD method is the most natural and convenient to use in
23178 * cases where the loss of several decimal digits of resolution
23179 * is acceptable. The J2000 method is best matched to the way
23180 * the argument is handled internally and will deliver the
23181 * optimum resolution. The MJD method and the date & time methods
23182 * are both good compromises between resolution and convenience.
23183 *
23184 * <li> The X,Y coordinates are those of the unit vector towards the
23185 * celestial intermediate pole. They represent the combined effects
23186 * of frame bias, precession and nutation.
23187 *
23188 * <li> The fundamental arguments used are as adopted in IERS Conventions
23189 * (2003) and are from Simon et al. (1994) and Souchay et al.
23190 * (1999).
23191 *
23192 * <li> This is an alternative to the angles-based method, via the JSOFA
23193 * function jauFw2xy and as used in jauXys06a for example. The two
23194 * methods agree at the 1 microarcsecond level (at present), a
23195 * negligible amount compared with the intrinsic accuracy of the
23196 * models. However, it would be unwise to mix the two methods
23197 * (angles-based and series-based) in a single application.
23198 *</ol>
23199 *<p>Called:<ul>
23200 * <li>{@link #jauFal03} mean anomaly of the Moon
23201 * <li>{@link #jauFalp03} mean anomaly of the Sun
23202 * <li>{@link #jauFaf03} mean argument of the latitude of the Moon
23203 * <li>{@link #jauFad03} mean elongation of the Moon from the Sun
23204 * <li>{@link #jauFaom03} mean longitude of the Moon's ascending node
23205 * <li>{@link #jauFame03} mean longitude of Mercury
23206 * <li>{@link #jauFave03} mean longitude of Venus
23207 * <li>{@link #jauFae03} mean longitude of Earth
23208 * <li>{@link #jauFama03} mean longitude of Mars
23209 * <li>{@link #jauFaju03} mean longitude of Jupiter
23210 * <li>{@link #jauFasa03} mean longitude of Saturn
23211 * <li>{@link #jauFaur03} mean longitude of Uranus
23212 * <li>{@link #jauFane03} mean longitude of Neptune
23213 * <li>{@link #jauFapa03} general accumulated precession in longitude
23214 * </ul>
23215 *<p>References:
23216 *
23217 * <p>Capitaine, N., Wallace, P.T. & Chapront, J., 2003,
23218 * Astron.Astrophys., 412, 567
23219 *
23220 * <p>Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855
23221 *
23222 * <p>McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003),
23223 * IERS Technical Note No. 32, BKG
23224 *
23225 * Simon, J.L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
23226 * Francou, G. & Laskar, J., Astron.Astrophys., 1994, 282, 663
23227 *
23228 * Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M., 1999,
23229 * Astron.Astrophys.Supp.Ser. 135, 111
23230 *
23231 * <p>Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981
23232 *
23233 *@version 2009 October 16
23234 *
23235 * @since Release 20101201
23236 *
23237 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
23238 */
23239 {
23240
23241 /* Maximum power of T in the polynomials for X and Y */
23242 final int MAXPT = (5);
23243
23244 /* Polynomial coefficients (arcsec, X then Y). */
23245 final double xyp[][] = {
23246
23247 { -0.016617,
23248 2004.191898,
23249 -0.4297829,
23250 -0.19861834,
23251 0.000007578,
23252 0.0000059285
23253 },
23254 { -0.006951,
23255 -0.025896,
23256 -22.4072747,
23257 0.00190059,
23258 0.001112526,
23259 0.0000001358
23260 }
23261 };
23262
23263 /* N.B mfals defined as class static (outside this method) to avoid problems with 65535 byte limit for methods */
23264 /* Number of frequencies: luni-solar */
23265 final int NFLS = mfals.length;
23266
23267 /* Number of frequencies: planetary */
23268 final int NFPL =mfapl.length ;
23269
23270 /* Pointers into amplitudes array, one pointer per frequency */
23271 final int nc[] = {
23272
23273 /* 1-100 */
23274 1, 21, 37, 51, 65, 79, 91, 103, 115, 127,
23275 139, 151, 163, 172, 184, 196, 207, 219, 231, 240,
23276 252, 261, 273, 285, 297, 309, 318, 327, 339, 351,
23277 363, 372, 384, 396, 405, 415, 423, 435, 444, 452,
23278 460, 467, 474, 482, 490, 498, 506, 513, 521, 528,
23279 536, 543, 551, 559, 566, 574, 582, 590, 597, 605,
23280 613, 620, 628, 636, 644, 651, 658, 666, 674, 680,
23281 687, 695, 702, 710, 717, 725, 732, 739, 746, 753,
23282 760, 767, 774, 782, 790, 798, 805, 812, 819, 826,
23283 833, 840, 846, 853, 860, 867, 874, 881, 888, 895,
23284
23285 /* 101-200 */
23286 901, 908, 914, 921, 928, 934, 941, 948, 955, 962,
23287 969, 976, 982, 989, 996, 1003, 1010, 1017, 1024, 1031,
23288 1037, 1043, 1050, 1057, 1064, 1071, 1078, 1084, 1091, 1098,
23289 1104, 1112, 1118, 1124, 1131, 1138, 1145, 1151, 1157, 1164,
23290 1171, 1178, 1185, 1192, 1199, 1205, 1212, 1218, 1226, 1232,
23291 1239, 1245, 1252, 1259, 1266, 1272, 1278, 1284, 1292, 1298,
23292 1304, 1310, 1316, 1323, 1329, 1335, 1341, 1347, 1353, 1359,
23293 1365, 1371, 1377, 1383, 1389, 1396, 1402, 1408, 1414, 1420,
23294 1426, 1434, 1440, 1446, 1452, 1459, 1465, 1471, 1477, 1482,
23295 1488, 1493, 1499, 1504, 1509, 1514, 1520, 1527, 1532, 1538,
23296
23297 /* 201-300 */
23298 1543, 1548, 1553, 1558, 1564, 1569, 1574, 1579, 1584, 1589,
23299 1594, 1596, 1598, 1600, 1602, 1605, 1608, 1610, 1612, 1617,
23300 1619, 1623, 1625, 1627, 1629, 1632, 1634, 1640, 1642, 1644,
23301 1646, 1648, 1650, 1652, 1654, 1658, 1660, 1662, 1664, 1668,
23302 1670, 1672, 1673, 1675, 1679, 1681, 1683, 1684, 1686, 1688,
23303 1690, 1693, 1695, 1697, 1701, 1703, 1705, 1707, 1709, 1711,
23304 1712, 1715, 1717, 1721, 1723, 1725, 1727, 1729, 1731, 1733,
23305 1735, 1737, 1739, 1741, 1743, 1745, 1747, 1749, 1751, 1753,
23306 1755, 1757, 1759, 1761, 1762, 1764, 1766, 1768, 1769, 1771,
23307 1773, 1775, 1777, 1779, 1781, 1783, 1785, 1787, 1788, 1790,
23308
23309 /* 301-400 */
23310 1792, 1794, 1796, 1798, 1800, 1802, 1804, 1806, 1807, 1809,
23311 1811, 1815, 1817, 1819, 1821, 1823, 1825, 1827, 1829, 1831,
23312 1833, 1835, 1837, 1839, 1840, 1842, 1844, 1848, 1850, 1852,
23313 1854, 1856, 1858, 1859, 1860, 1862, 1864, 1866, 1868, 1869,
23314 1871, 1873, 1875, 1877, 1879, 1881, 1883, 1885, 1887, 1889,
23315 1891, 1892, 1896, 1898, 1900, 1901, 1903, 1905, 1907, 1909,
23316 1910, 1911, 1913, 1915, 1919, 1921, 1923, 1927, 1929, 1931,
23317 1933, 1935, 1937, 1939, 1943, 1945, 1947, 1948, 1949, 1951,
23318 1953, 1955, 1957, 1958, 1960, 1962, 1964, 1966, 1968, 1970,
23319 1971, 1973, 1974, 1975, 1977, 1979, 1980, 1981, 1982, 1984,
23320
23321 /* 401-500 */
23322 1986, 1988, 1990, 1992, 1994, 1995, 1997, 1999, 2001, 2003,
23323 2005, 2007, 2008, 2009, 2011, 2013, 2015, 2017, 2019, 2021,
23324 2023, 2024, 2025, 2027, 2029, 2031, 2033, 2035, 2037, 2041,
23325 2043, 2045, 2046, 2047, 2049, 2051, 2053, 2055, 2056, 2057,
23326 2059, 2061, 2063, 2065, 2067, 2069, 2070, 2071, 2072, 2074,
23327 2076, 2078, 2080, 2082, 2084, 2086, 2088, 2090, 2092, 2094,
23328 2095, 2096, 2097, 2099, 2101, 2105, 2106, 2107, 2108, 2109,
23329 2110, 2111, 2113, 2115, 2119, 2121, 2123, 2125, 2127, 2129,
23330 2131, 2133, 2135, 2136, 2137, 2139, 2141, 2143, 2145, 2147,
23331 2149, 2151, 2153, 2155, 2157, 2159, 2161, 2163, 2165, 2167,
23332
23333 /* 501-600 */
23334 2169, 2171, 2173, 2175, 2177, 2179, 2181, 2183, 2185, 2186,
23335 2187, 2188, 2192, 2193, 2195, 2197, 2199, 2201, 2203, 2205,
23336 2207, 2209, 2211, 2213, 2217, 2219, 2221, 2223, 2225, 2227,
23337 2229, 2231, 2233, 2234, 2235, 2236, 2237, 2238, 2239, 2240,
23338 2241, 2244, 2246, 2248, 2250, 2252, 2254, 2256, 2258, 2260,
23339 2262, 2264, 2266, 2268, 2270, 2272, 2274, 2276, 2278, 2280,
23340 2282, 2284, 2286, 2288, 2290, 2292, 2294, 2296, 2298, 2300,
23341 2302, 2303, 2304, 2305, 2306, 2307, 2309, 2311, 2313, 2315,
23342 2317, 2319, 2321, 2323, 2325, 2327, 2329, 2331, 2333, 2335,
23343 2337, 2341, 2343, 2345, 2347, 2349, 2351, 2352, 2355, 2356,
23344
23345 /* 601-700 */
23346 2357, 2358, 2359, 2361, 2363, 2364, 2365, 2366, 2367, 2368,
23347 2369, 2370, 2371, 2372, 2373, 2374, 2376, 2378, 2380, 2382,
23348 2384, 2385, 2386, 2387, 2388, 2389, 2390, 2391, 2392, 2393,
23349 2394, 2395, 2396, 2397, 2398, 2399, 2400, 2401, 2402, 2403,
23350 2404, 2405, 2406, 2407, 2408, 2409, 2410, 2411, 2412, 2413,
23351 2414, 2415, 2417, 2418, 2430, 2438, 2445, 2453, 2460, 2468,
23352 2474, 2480, 2488, 2496, 2504, 2512, 2520, 2527, 2535, 2543,
23353 2550, 2558, 2566, 2574, 2580, 2588, 2596, 2604, 2612, 2619,
23354 2627, 2634, 2642, 2648, 2656, 2664, 2671, 2679, 2685, 2693,
23355 2701, 2709, 2717, 2725, 2733, 2739, 2747, 2753, 2761, 2769,
23356
23357 /* 701-800 */
23358 2777, 2785, 2793, 2801, 2809, 2817, 2825, 2833, 2841, 2848,
23359 2856, 2864, 2872, 2878, 2884, 2892, 2898, 2906, 2914, 2922,
23360 2930, 2938, 2944, 2952, 2958, 2966, 2974, 2982, 2988, 2996,
23361 3001, 3009, 3017, 3025, 3032, 3039, 3045, 3052, 3059, 3067,
23362 3069, 3076, 3083, 3090, 3098, 3105, 3109, 3111, 3113, 3120,
23363 3124, 3128, 3132, 3136, 3140, 3144, 3146, 3150, 3158, 3161,
23364 3165, 3166, 3168, 3172, 3176, 3180, 3182, 3185, 3189, 3193,
23365 3194, 3197, 3200, 3204, 3208, 3212, 3216, 3219, 3221, 3222,
23366 3226, 3230, 3234, 3238, 3242, 3243, 3247, 3251, 3254, 3258,
23367 3262, 3266, 3270, 3274, 3275, 3279, 3283, 3287, 3289, 3293,
23368
23369 /* 801-900 */
23370 3296, 3300, 3303, 3307, 3311, 3315, 3319, 3321, 3324, 3327,
23371 3330, 3334, 3338, 3340, 3342, 3346, 3350, 3354, 3358, 3361,
23372 3365, 3369, 3373, 3377, 3381, 3385, 3389, 3393, 3394, 3398,
23373 3402, 3406, 3410, 3413, 3417, 3421, 3425, 3429, 3433, 3435,
23374 3439, 3443, 3446, 3450, 3453, 3457, 3458, 3461, 3464, 3468,
23375 3472, 3476, 3478, 3481, 3485, 3489, 3493, 3497, 3501, 3505,
23376 3507, 3511, 3514, 3517, 3521, 3524, 3525, 3527, 3529, 3533,
23377 3536, 3540, 3541, 3545, 3548, 3551, 3555, 3559, 3563, 3567,
23378 3569, 3570, 3574, 3576, 3578, 3582, 3586, 3590, 3593, 3596,
23379 3600, 3604, 3608, 3612, 3616, 3620, 3623, 3626, 3630, 3632,
23380
23381 /* 901-1000 */
23382 3636, 3640, 3643, 3646, 3648, 3652, 3656, 3660, 3664, 3667,
23383 3669, 3671, 3675, 3679, 3683, 3687, 3689, 3693, 3694, 3695,
23384 3699, 3703, 3705, 3707, 3710, 3713, 3717, 3721, 3725, 3729,
23385 3733, 3736, 3740, 3744, 3748, 3752, 3754, 3757, 3759, 3763,
23386 3767, 3770, 3773, 3777, 3779, 3783, 3786, 3790, 3794, 3798,
23387 3801, 3805, 3809, 3813, 3817, 3821, 3825, 3827, 3831, 3835,
23388 3836, 3837, 3840, 3844, 3848, 3852, 3856, 3859, 3863, 3867,
23389 3869, 3871, 3875, 3879, 3883, 3887, 3890, 3894, 3898, 3901,
23390 3905, 3909, 3913, 3917, 3921, 3922, 3923, 3924, 3926, 3930,
23391 3932, 3936, 3938, 3940, 3944, 3948, 3952, 3956, 3959, 3963,
23392
23393 /* 1001-1100 */
23394 3965, 3969, 3973, 3977, 3979, 3981, 3982, 3986, 3989, 3993,
23395 3997, 4001, 4004, 4006, 4009, 4012, 4016, 4020, 4024, 4026,
23396 4028, 4032, 4036, 4040, 4044, 4046, 4050, 4054, 4058, 4060,
23397 4062, 4063, 4064, 4068, 4071, 4075, 4077, 4081, 4083, 4087,
23398 4089, 4091, 4095, 4099, 4101, 4103, 4105, 4107, 4111, 4115,
23399 4119, 4123, 4127, 4129, 4131, 4135, 4139, 4141, 4143, 4145,
23400 4149, 4153, 4157, 4161, 4165, 4169, 4173, 4177, 4180, 4183,
23401 4187, 4191, 4195, 4198, 4201, 4205, 4209, 4212, 4213, 4216,
23402 4217, 4221, 4223, 4226, 4230, 4234, 4236, 4240, 4244, 4248,
23403 4252, 4256, 4258, 4262, 4264, 4266, 4268, 4270, 4272, 4276,
23404
23405 /* 1101-1200 */
23406 4279, 4283, 4285, 4287, 4289, 4293, 4295, 4299, 4300, 4301,
23407 4305, 4309, 4313, 4317, 4319, 4323, 4325, 4329, 4331, 4333,
23408 4335, 4337, 4341, 4345, 4349, 4351, 4353, 4357, 4361, 4365,
23409 4367, 4369, 4373, 4377, 4381, 4383, 4387, 4389, 4391, 4395,
23410 4399, 4403, 4407, 4411, 4413, 4414, 4415, 4418, 4419, 4421,
23411 4423, 4427, 4429, 4431, 4433, 4435, 4437, 4439, 4443, 4446,
23412 4450, 4452, 4456, 4458, 4460, 4462, 4466, 4469, 4473, 4477,
23413 4481, 4483, 4487, 4489, 4491, 4493, 4497, 4499, 4501, 4504,
23414 4506, 4510, 4513, 4514, 4515, 4518, 4521, 4522, 4525, 4526,
23415 4527, 4530, 4533, 4534, 4537, 4541, 4542, 4543, 4544, 4545,
23416
23417 /* 1201-1300 */
23418 4546, 4547, 4550, 4553, 4554, 4555, 4558, 4561, 4564, 4567,
23419 4568, 4571, 4574, 4575, 4578, 4581, 4582, 4585, 4586, 4588,
23420 4590, 4592, 4596, 4598, 4602, 4604, 4608, 4612, 4613, 4616,
23421 4619, 4622, 4623, 4624, 4625, 4626, 4629, 4632, 4633, 4636,
23422 4639, 4640, 4641, 4642, 4643, 4644, 4645, 4648, 4649, 4650,
23423 4651, 4652, 4653, 4656, 4657, 4660, 4661, 4664, 4667, 4670,
23424 4671, 4674, 4675, 4676, 4677, 4678, 4681, 4682, 4683, 4684,
23425 4687, 4688, 4689, 4692, 4693, 4696, 4697, 4700, 4701, 4702,
23426 4703, 4704, 4707, 4708, 4711, 4712, 4715, 4716, 4717, 4718,
23427 4719, 4720, 4721, 4722, 4723, 4726, 4729, 4730, 4733, 4736,
23428
23429 /* 1301-(NFLS+NFPL) */
23430 4737, 4740, 4741, 4742, 4745, 4746, 4749, 4752, 4753
23431 };
23432
23433 /* Amplitude coefficients (microarcsec); indexed using the nc array. */
23434 final double a[] = {
23435
23436 /* 1-105 */
23437 -6844318.44, 9205236.26,1328.67,1538.18, 205833.11,
23438 153041.79, -3309.73, 853.32,2037.98, -2301.27,
23439 81.46, 120.56, -20.39, -15.22, 1.73, -1.61, -0.10, 0.11,
23440 -0.02, -0.02, -523908.04, 573033.42,-544.75,-458.66,
23441 12814.01, 11714.49, 198.97,-290.91, 155.74,-143.27,
23442 -2.75, -1.03, -1.27, -1.16, 0.00, -0.01, -90552.22,
23443 97846.69, 111.23, 137.41,2187.91,2024.68, 41.44, -51.26,
23444 26.92, -24.46, -0.46, -0.28, -0.22, -0.20, 82168.76,
23445 -89618.24, -27.64, -29.05, -2004.36, -1837.32,
23446 -36.07, 48.00, -24.43, 22.41, 0.47, 0.24, 0.20, 0.18,
23447 58707.02,7387.02, 470.05,-192.40, 164.33, -1312.21,
23448 -179.73, -28.93, -17.36, -1.83, -0.50, 3.57, 0.00, 0.13,
23449 -20557.78, 22438.42, -20.84, -17.40, 501.82, 459.68,
23450 59.20, -67.30, 6.08, -5.61, -1.36, -1.19, 28288.28,
23451 -674.99, -34.69, 35.80, -15.07,-632.54, -11.19, 0.78, -8.41,
23452 0.17, 0.01, 0.07, -15406.85, 20069.50, 15.12,
23453
23454 /* 106-219 */
23455 31.80, 448.76, 344.50, -5.77, 1.41, 4.59, -5.02, 0.17,
23456 0.24, -11991.74, 12902.66, 32.46, 36.70, 288.49,
23457 268.14, 5.70, -7.06, 3.57, -3.23, -0.06, -0.04,
23458 -8584.95, -9592.72, 4.42, -13.20,-214.50, 192.06,
23459 23.87, 29.83, 2.54, 2.40, 0.60, -0.48,5095.50,
23460 -6918.22, 7.19, 3.92,-154.91,-113.94, 2.86, -1.04,
23461 -1.52, 1.73, -0.07, -0.10, -4910.93, -5331.13,
23462 0.76, 0.40,-119.21, 109.81, 2.16, 3.20, 1.46, 1.33,
23463 0.04, -0.02, -6245.02,-123.48, -6.68, -8.20, -2.76,
23464 139.64, 2.71, 0.15, 1.86,2511.85, -3323.89, 1.07,
23465 -0.90, -74.33, -56.17, 1.16, -0.01, -0.75, 0.83, -0.02,
23466 -0.04,2307.58,3143.98, -7.52, 7.50, 70.31, -51.60, 1.46,
23467 0.16, -0.69, -0.79, 0.02, -0.05,2372.58,2554.51, 5.93,
23468 -6.60, 57.12, -53.05, -0.96, -1.24, -0.71, -0.64, -0.01,
23469 -2053.16,2636.13, 5.13, 7.80, 58.94, 45.91, -0.42,
23470 -0.12, 0.61, -0.66, 0.02, 0.03, -1825.49,
23471
23472 /* 220-339 */
23473 -2423.59, 1.23, -2.00, -54.19, 40.82, -1.07, -1.02,
23474 0.54, 0.61, -0.04, 0.04,2521.07,-122.28, -5.97, 2.90,
23475 -2.73, -56.37, -0.82, 0.13, -0.75, -1534.09,1645.01,
23476 6.29, 6.80, 36.78, 34.30, 0.92, -1.25, 0.46, -0.41,
23477 -0.02, -0.01,1898.27, 47.70, -0.72, 2.50, 1.07, -42.45,
23478 -0.94, 0.02, -0.56, -1292.02, -1387.00, 0.00,
23479 0.00, -31.01, 28.89, 0.68, 0.00, 0.38, 0.35, -0.01,
23480 -0.01, -1234.96,1323.81, 5.21, 5.90, 29.60, 27.61,
23481 0.74, -1.22, 0.37, -0.33, -0.02, -0.01,1137.48,
23482 -1233.89, -0.04, -0.30, -27.59, -25.43, -0.61, 1.00,
23483 -0.34, 0.31, 0.01, 0.01,-813.13, -1075.60, 0.40,
23484 0.30, -24.05, 18.18, -0.40, -0.01, 0.24, 0.27, -0.01,
23485 0.01,1163.22, -60.90, -2.94, 1.30, -1.36, -26.01, -0.58,
23486 0.07, -0.35,1029.70, -55.55, -2.63, 1.10, -1.25, -23.02,
23487 -0.52, 0.06, -0.31,-556.26, 852.85, 3.16, -4.48, 19.06,
23488 12.44, -0.81, -0.27, 0.17, -0.21, 0.00, 0.02,-603.52,
23489
23490 /* 340-467 */
23491 -800.34, 0.44, 0.10, -17.90, 13.49, -0.08, -0.01, 0.18,
23492 0.20, -0.01, 0.01,-628.24, 684.99, -0.64, -0.50, 15.32,
23493 14.05, 3.18, -4.19, 0.19, -0.17, -0.09, -0.07,-866.48,
23494 -16.26, 0.52, -1.30, -0.36, 19.37, 0.43, -0.01, 0.26,
23495 -512.37, 695.54, -1.47, -1.40, 15.55, 11.46, -0.16, 0.03,
23496 0.15, -0.17, 0.01, 0.01, 506.65, 643.75, 2.54, -2.62,
23497 14.40, -11.33, -0.77, -0.06, -0.15, -0.16, 0.00, 0.01,
23498 664.57, 16.81, -0.40, 1.00, 0.38, -14.86, -3.71, -0.09,
23499 -0.20, 405.91, 522.11, 0.99, -1.50, 11.67, -9.08, -0.25,
23500 -0.02, -0.12, -0.13,-305.78, 326.60, 1.75, 1.90, 7.30,
23501 6.84, 0.20, -0.04, 300.99,-325.03, -0.44, -0.50, -7.27,
23502 -6.73, -1.01, 0.01, 0.00, 0.08, 0.00, 0.02, 438.51,
23503 10.47, -0.56, -0.20, 0.24, -9.81, -0.24, 0.01, -0.13,
23504 -264.02, 335.24, 0.99, 1.40, 7.49, 5.90, -0.27, -0.02,
23505 284.09, 307.03, 0.32, -0.40, 6.87, -6.35, -0.99, -0.01,
23506 -250.54, 327.11, 0.08, 0.40, 7.31, 5.60, -0.30, 230.72,
23507
23508 /* 468-595 */
23509 -304.46, 0.08, -0.10, -6.81, -5.16, 0.27, 229.78, 304.17,
23510 -0.60, 0.50, 6.80, -5.14, 0.33, 0.01, 256.30,-276.81,
23511 -0.28, -0.40, -6.19, -5.73, -0.14, 0.01,-212.82, 269.45,
23512 0.84, 1.20, 6.02, 4.76, 0.14, -0.02, 196.64, 272.05,
23513 -0.84, 0.90, 6.08, -4.40, 0.35, 0.02, 188.95, 272.22,
23514 -0.12, 0.30, 6.09, -4.22, 0.34,-292.37, -5.10, -0.32,
23515 -0.40, -0.11, 6.54, 0.14, 0.01, 161.79,-220.67, 0.24,
23516 0.10, -4.93, -3.62, -0.08, 261.54, -19.94, -0.95, 0.20,
23517 -0.45, -5.85, -0.13, 0.02, 142.16,-190.79, 0.20, 0.10,
23518 -4.27, -3.18, -0.07, 187.95, -4.11, -0.24, 0.30, -0.09,
23519 -4.20, -0.09, 0.01, 0.00, 0.00, -79.08, 167.90, 0.04,
23520 0.00, 3.75, 1.77, 121.98, 131.04, -0.08, 0.10, 2.93,
23521 -2.73, -0.06,-172.95, -8.11, -0.40, -0.20, -0.18, 3.87,
23522 0.09, 0.01,-160.15, -55.30, -14.04, 13.90, -1.23, 3.58,
23523 0.40, 0.31,-115.40, 123.20, 0.60, 0.70, 2.75, 2.58,
23524 0.08, -0.01,-168.26, -2.00, 0.20, -0.20, -0.04, 3.76,
23525
23526 /* 596-723 */
23527 0.08,-114.49, 123.20, 0.32, 0.40, 2.75, 2.56, 0.07,
23528 -0.01, 112.14, 120.70, 0.28, -0.30, 2.70, -2.51, -0.07,
23529 -0.01, 161.34, 4.03, 0.20, 0.20, 0.09, -3.61, -0.08,
23530 91.31, 126.64, -0.40, 0.40, 2.83, -2.04, -0.04, 0.01,
23531 105.29, 112.90, 0.44, -0.50, 2.52, -2.35, -0.07, -0.01,
23532 98.69,-106.20, -0.28, -0.30, -2.37, -2.21, -0.06, 0.01,
23533 86.74,-112.94, -0.08, -0.20, -2.53, -1.94, -0.05,-134.81,
23534 3.51, 0.20, -0.20, 0.08, 3.01, 0.07, 79.03, 107.31,
23535 -0.24, 0.20, 2.40, -1.77, -0.04, 0.01, 132.81, -10.77,
23536 -0.52, 0.10, -0.24, -2.97, -0.07, 0.01,-130.31, -0.90,
23537 0.04, 0.00, 0.00, 2.91, -78.56, 85.32, 0.00, 0.00,
23538 1.91, 1.76, 0.04, 0.00, 0.00, -41.53, 89.10, 0.02,
23539 0.00, 1.99, 0.93, 66.03, -71.00, -0.20, -0.20, -1.59,
23540 -1.48, -0.04, 60.50, 64.70, 0.36, -0.40, 1.45, -1.35,
23541 -0.04, -0.01, -52.27, -70.01, 0.00, 0.00, -1.57, 1.17,
23542 0.03, -52.95, 66.29, 0.32, 0.40, 1.48, 1.18, 0.04,
23543
23544 /* 724-851 */
23545 -0.01, 51.02, 67.25, 0.00, 0.00, 1.50, -1.14, -0.03,
23546 -55.66, -60.92, 0.16, -0.20, -1.36, 1.24, 0.03, -54.81,
23547 -59.20, -0.08, 0.20, -1.32, 1.23, 0.03, 51.32, -55.60,
23548 0.00, 0.00, -1.24, -1.15, -0.03, 48.29, 51.80, 0.20,
23549 -0.20, 1.16, -1.08, -0.03, -45.59, -49.00, -0.12, 0.10,
23550 -1.10, 1.02, 0.03, 40.54, -52.69, -0.04, -0.10, -1.18,
23551 -0.91, -0.02, -40.58, -49.51, -1.00, 1.00, -1.11, 0.91,
23552 0.04, 0.02, -43.76, 46.50, 0.36, 0.40, 1.04, 0.98,
23553 0.03, -0.01, 62.65, -5.00, -0.24, 0.00, -0.11, -1.40,
23554 -0.03, 0.01, -38.57, 49.59, 0.08, 0.10, 1.11, 0.86,
23555 0.02, -33.22, -44.04, 0.08, -0.10, -0.98, 0.74, 0.02,
23556 37.15, -39.90, -0.12, -0.10, -0.89, -0.83, -0.02, 36.68,
23557 -39.50, -0.04, -0.10, -0.88, -0.82, -0.02, -53.22, -3.91,
23558 -0.20, 0.00, -0.09, 1.19, 0.03, 32.43, -42.19, -0.04,
23559 -0.10, -0.94, -0.73, -0.02, -51.00, -2.30, -0.12, -0.10,
23560 0.00, 1.14, -29.53, -39.11, 0.04, 0.00, -0.87, 0.66,
23561
23562 /* 852-979 */
23563 0.02, 28.50, -38.92, -0.08, -0.10, -0.87, -0.64, -0.02,
23564 26.54, 36.95, -0.12, 0.10, 0.83, -0.59, -0.01, 26.54,
23565 34.59, 0.04, -0.10, 0.77, -0.59, -0.02, 28.35, -32.55,
23566 -0.16, 0.20, -0.73, -0.63, -0.01, -28.00, 30.40, 0.00,
23567 0.00, 0.68, 0.63, 0.01, -27.61, 29.40, 0.20, 0.20,
23568 0.66, 0.62, 0.02, 40.33, 0.40, -0.04, 0.10, 0.00,
23569 -0.90, -23.28, 31.61, -0.08, -0.10, 0.71, 0.52, 0.01,
23570 37.75, 0.80, 0.04, 0.10, 0.00, -0.84, 23.66, 25.80,
23571 0.00, 0.00, 0.58, -0.53, -0.01, 21.01, -27.91, 0.00,
23572 0.00, -0.62, -0.47, -0.01, -34.81, 2.89, 0.04, 0.00,
23573 0.00, 0.78, -23.49, -25.31, 0.00, 0.00, -0.57, 0.53,
23574 0.01, -23.47, 25.20, 0.16, 0.20, 0.56, 0.52, 0.02,
23575 19.58, 27.50, -0.12, 0.10, 0.62, -0.44, -0.01, -22.67,
23576 -24.40, -0.08, 0.10, -0.55, 0.51, 0.01, -19.97, 25.00,
23577 0.12, 0.20, 0.56, 0.45, 0.01, 21.28, -22.80, -0.08,
23578 -0.10, -0.51, -0.48, -0.01, -30.47, 0.91, 0.04, 0.00,
23579
23580 /* 980-1107 */
23581 0.00, 0.68, 18.58, 24.00, 0.04, -0.10, 0.54, -0.42,
23582 -0.01, -18.02, 24.40, -0.04, -0.10, 0.55, 0.40, 0.01,
23583 17.74, 22.50, 0.08, -0.10, 0.50, -0.40, -0.01, -19.41,
23584 20.70, 0.08, 0.10, 0.46, 0.43, 0.01, -18.64, 20.11,
23585 0.00, 0.00, 0.45, 0.42, 0.01, -16.75, 21.60, 0.04,
23586 0.10, 0.48, 0.37, 0.01, -18.42, -20.00, 0.00, 0.00,
23587 -0.45, 0.41, 0.01, -26.77, 1.41, 0.08, 0.00, 0.00,
23588 0.60, -26.17, -0.19, 0.00, 0.00, 0.00, 0.59, -15.52,
23589 20.51, 0.00, 0.00, 0.46, 0.35, 0.01, -25.42, -1.91,
23590 -0.08, 0.00, -0.04, 0.57, 0.45, -17.42, 18.10, 0.00,
23591 0.00, 0.40, 0.39, 0.01, 16.39, -17.60, -0.08, -0.10,
23592 -0.39, -0.37, -0.01, -14.37, 18.91, 0.00, 0.00, 0.42,
23593 0.32, 0.01, 23.39, -2.40, -0.12, 0.00, 0.00, -0.52,
23594 14.32, -18.50, -0.04, -0.10, -0.41, -0.32, -0.01, 15.69,
23595 17.08, 0.00, 0.00, 0.38, -0.35, -0.01, -22.99, 0.50,
23596 0.04, 0.00, 0.00, 0.51, 0.00, 0.00, 14.47, -17.60,
23597
23598 /* 1108-1235 */
23599 -0.01, 0.00, -0.39, -0.32, -13.33, 18.40, -0.04, -0.10,
23600 0.41, 0.30, 22.47, -0.60, -0.04, 0.00, 0.00, -0.50,
23601 -12.78, -17.41, 0.04, 0.00, -0.39, 0.29, 0.01, -14.10,
23602 -15.31, 0.04, 0.00, -0.34, 0.32, 0.01, 11.98, 16.21,
23603 -0.04, 0.00, 0.36, -0.27, -0.01, 19.65, -1.90, -0.08,
23604 0.00, 0.00, -0.44, 19.61, -1.50, -0.08, 0.00, 0.00,
23605 -0.44, 13.41, -14.30, -0.04, -0.10, -0.32, -0.30, -0.01,
23606 -13.29, 14.40, 0.00, 0.00, 0.32, 0.30, 0.01, 11.14,
23607 -14.40, -0.04, 0.00, -0.32, -0.25, -0.01, 12.24, -13.38,
23608 0.04, 0.00, -0.30, -0.27, -0.01, 10.07, -13.81, 0.04,
23609 0.00, -0.31, -0.23, -0.01, 10.46, 13.10, 0.08, -0.10,
23610 0.29, -0.23, -0.01, 16.55, -1.71, -0.08, 0.00, 0.00,
23611 -0.37, 9.75, -12.80, 0.00, 0.00, -0.29, -0.22, -0.01,
23612 9.11, 12.80, 0.00, 0.00, 0.29, -0.20, 0.00, 0.00,
23613 -6.44, -13.80, 0.00, 0.00, -0.31, 0.14, -9.19, -12.00,
23614 0.00, 0.00, -0.27, 0.21, -10.30, 10.90, 0.08, 0.10,
23615
23616 /* 1236-1363 */
23617 0.24, 0.23, 0.01, 14.92, -0.80, -0.04, 0.00, 0.00,
23618 -0.33, 10.02, -10.80, 0.00, 0.00, -0.24, -0.22, -0.01,
23619 -9.75, 10.40, 0.04, 0.00, 0.23, 0.22, 0.01, 9.67,
23620 -10.40, -0.04, 0.00, -0.23, -0.22, -0.01, -8.28, -11.20,
23621 0.04, 0.00, -0.25, 0.19, 13.32, -1.41, -0.08, 0.00,
23622 0.00, -0.30, 8.27, 10.50, 0.04, 0.00, 0.23, -0.19,
23623 0.00, 0.00, 13.13, 0.00, 0.00, 0.00, 0.00, -0.29,
23624 -12.93, 0.70, 0.04, 0.00, 0.00, 0.29, 7.91, -10.20,
23625 0.00, 0.00, -0.23, -0.18, -7.84, -10.00, -0.04, 0.00,
23626 -0.22, 0.18, 7.44, 9.60, 0.00, 0.00, 0.21, -0.17,
23627 -7.64, 9.40, 0.08, 0.10, 0.21, 0.17, 0.01, -11.38,
23628 0.60, 0.04, 0.00, 0.00, 0.25, -7.48, 8.30, 0.00,
23629 0.00, 0.19, 0.17, -10.98, -0.20, 0.00, 0.00, 0.00,
23630 0.25, 10.98, 0.20, 0.00, 0.00, 0.00, -0.25, 7.40,
23631 -7.90, -0.04, 0.00, -0.18, -0.17, -6.09, 8.40, -0.04,
23632 0.00, 0.19, 0.14, -6.94, -7.49, 0.00, 0.00, -0.17,
23633
23634 /* 1364-1491 */
23635 0.16, 6.92, 7.50, 0.04, 0.00, 0.17, -0.15, 6.20,
23636 8.09, 0.00, 0.00, 0.18, -0.14, -6.12, 7.80, 0.04,
23637 0.00, 0.17, 0.14, 5.85, -7.50, 0.00, 0.00, -0.17,
23638 -0.13, -6.48, 6.90, 0.08, 0.10, 0.15, 0.14, 0.01,
23639 6.32, 6.90, 0.00, 0.00, 0.15, -0.14, 5.61, -7.20,
23640 0.00, 0.00, -0.16, -0.13, 9.07, 0.00, 0.00, 0.00,
23641 0.00, -0.20, 5.25, 6.90, 0.00, 0.00, 0.15, -0.12,
23642 -8.47, -0.40, 0.00, 0.00, 0.00, 0.19, 6.32, -5.39,
23643 -1.11, 1.10, -0.12, -0.14, 0.02, 0.02, 5.73, -6.10,
23644 -0.04, 0.00, -0.14, -0.13, 4.70, 6.60, -0.04, 0.00,
23645 0.15, -0.11, -4.90, -6.40, 0.00, 0.00, -0.14, 0.11,
23646 -5.33, 5.60, 0.04, 0.10, 0.13, 0.12, 0.01, -4.81,
23647 6.00, 0.04, 0.00, 0.13, 0.11, 5.13, 5.50, 0.04,
23648 0.00, 0.12, -0.11, 4.50, 5.90, 0.00, 0.00, 0.13,
23649 -0.10, -4.22, 6.10, 0.00, 0.00, 0.14, -4.53, 5.70,
23650 0.00, 0.00, 0.13, 0.10, 4.18, 5.70, 0.00, 0.00,
23651
23652 /* 1492-1619 */
23653 0.13, -4.75, -5.19, 0.00, 0.00, -0.12, 0.11, -4.06,
23654 5.60, 0.00, 0.00, 0.13, -3.98, 5.60, -0.04, 0.00,
23655 0.13, 4.02, -5.40, 0.00, 0.00, -0.12, 4.49, -4.90,
23656 -0.04, 0.00, -0.11, -0.10, -3.62, -5.40, -0.16, 0.20,
23657 -0.12, 0.00, 0.01, 4.38, 4.80, 0.00, 0.00, 0.11,
23658 -6.40, -0.10, 0.00, 0.00, 0.00, 0.14, -3.98, 5.00,
23659 0.04, 0.00, 0.11, -3.82, -5.00, 0.00, 0.00, -0.11,
23660 -3.71, 5.07, 0.00, 0.00, 0.11, 4.14, 4.40, 0.00,
23661 0.00, 0.10, -6.01, -0.50, -0.04, 0.00, 0.00, 0.13,
23662 -4.04, 4.39, 0.00, 0.00, 0.10, 3.45, -4.72, 0.00,
23663 0.00, -0.11, 3.31, 4.71, 0.00, 0.00, 0.11, 3.26,
23664 -4.50, 0.00, 0.00, -0.10, -3.26, -4.50, 0.00, 0.00,
23665 -0.10, -3.34, -4.40, 0.00, 0.00, -0.10, -3.74, -4.00,
23666 3.70, 4.00, 3.34, -4.30, 3.30, -4.30, -3.66, 3.90,
23667 0.04, 3.66, 3.90, 0.04, -3.62, -3.90, -3.61, 3.90,
23668 -0.20, 5.30, 0.00, 0.00, 0.12, 3.06, 4.30, 3.30,
23669
23670 /* 1620-1747 */
23671 4.00, 0.40, 0.20, 3.10, 4.10, -3.06, 3.90, -3.30,
23672 -3.60, -3.30, 3.36, 0.01, 3.14, 3.40, -4.57, -0.20,
23673 0.00, 0.00, 0.00, 0.10, -2.70, -3.60, 2.94, -3.20,
23674 -2.90, 3.20, 2.47, -3.40, 2.55, -3.30, 2.80, -3.08,
23675 2.51, 3.30, -4.10, 0.30, -0.12, -0.10, 4.10, 0.20,
23676 -2.74, 3.00, 2.46, 3.23, -3.66, 1.20, -0.20, 0.20,
23677 3.74, -0.40, -2.51, -2.80, -3.74, 2.27, -2.90, 0.00,
23678 0.00, -2.50, 2.70, -2.51, 2.60, -3.50, 0.20, 3.38,
23679 -2.22, -2.50, 3.26, -0.40, 1.95, -2.60, 3.22, -0.40,
23680 -0.04, -1.79, -2.60, 1.91, 2.50, 0.74, 3.05, -0.04,
23681 0.08, 2.11, -2.30, -2.11, 2.20, -1.87, -2.40, 2.03,
23682 -2.20, -2.03, 2.20, 2.98, 0.00, 0.00, 2.98, -1.71,
23683 2.40, 2.94, -0.10, -0.12, 0.10, 1.67, 2.40, -1.79,
23684 2.30, -1.79, 2.20, -1.67, 2.20, 1.79, -2.00, 1.87,
23685 -1.90, 1.63, -2.10, -1.59, 2.10, 1.55, -2.10, -1.55,
23686 2.10, -2.59, -0.20, -1.75, -1.90, -1.75, 1.90, -1.83,
23687
23688 /* 1748-1875 */
23689 -1.80, 1.51, 2.00, -1.51, -2.00, 1.71, 1.80, 1.31,
23690 2.10, -1.43, 2.00, 1.43, 2.00, -2.43, -1.51, 1.90,
23691 -1.47, 1.90, 2.39, 0.20, -2.39, 1.39, 1.90, 1.39,
23692 -1.80, 1.47, -1.60, 1.47, -1.60, 1.43, -1.50, -1.31,
23693 1.60, 1.27, -1.60, -1.27, 1.60, 1.27, -1.60, 2.03,
23694 1.35, 1.50, -1.39, -1.40, 1.95, -0.20, -1.27, 1.49,
23695 1.19, 1.50, 1.27, 1.40, 1.15, 1.50, 1.87, -0.10,
23696 -1.12, -1.50, 1.87, -1.11, -1.50, -1.11, -1.50, 0.00,
23697 0.00, 1.19, 1.40, 1.27, -1.30, -1.27, -1.30, -1.15,
23698 1.40, -1.23, 1.30, -1.23, -1.30, 1.22, -1.29, 1.07,
23699 -1.40, 1.75, -0.20, -1.03, -1.40, -1.07, 1.20, -1.03,
23700 1.15, 1.07, 1.10, 1.51, -1.03, 1.10, 1.03, -1.10,
23701 0.00, 0.00, -1.03, -1.10, 0.91, -1.20, -0.88, -1.20,
23702 -0.88, 1.20, -0.95, 1.10, -0.95, -1.10, 1.43, -1.39,
23703 0.95, -1.00, -0.95, 1.00, -0.80, 1.10, 0.91, -1.00,
23704 -1.35, 0.88, 1.00, -0.83, 1.00, -0.91, 0.90, 0.91,
23705
23706 /* 1876-2003 */
23707 0.90, 0.88, -0.90, -0.76, -1.00, -0.76, 1.00, 0.76,
23708 1.00, -0.72, 1.00, 0.84, -0.90, 0.84, 0.90, 1.23,
23709 0.00, 0.00, -0.52, -1.10, -0.68, 1.00, 1.19, -0.20,
23710 1.19, 0.76, 0.90, 1.15, -0.10, 1.15, -0.10, 0.72,
23711 -0.90, -1.15, -1.15, 0.68, 0.90, -0.68, 0.90, -1.11,
23712 0.00, 0.00, 0.20, 0.79, 0.80, -1.11, -0.10, 0.00,
23713 0.00, -0.48, -1.00, -0.76, -0.80, -0.72, -0.80, -1.07,
23714 -0.10, 0.64, 0.80, -0.64, -0.80, 0.64, 0.80, 0.40,
23715 0.60, 0.52, -0.50, -0.60, -0.80, -0.71, 0.70, -0.99,
23716 0.99, 0.56, 0.80, -0.56, 0.80, 0.68, -0.70, 0.68,
23717 0.70, -0.95, -0.64, 0.70, 0.64, 0.70, -0.60, 0.70,
23718 -0.60, -0.70, -0.91, -0.10, -0.51, 0.76, -0.91, -0.56,
23719 0.70, 0.88, 0.88, -0.63, -0.60, 0.55, -0.60, -0.80,
23720 0.80, -0.80, -0.52, 0.60, 0.52, 0.60, 0.52, -0.60,
23721 -0.48, 0.60, 0.48, 0.60, 0.48, 0.60, -0.76, 0.44,
23722 -0.60, 0.52, -0.50, -0.52, 0.50, 0.40, 0.60, -0.40,
23723
23724 /* 2004-2131 */
23725 -0.60, 0.40, -0.60, 0.72, -0.72, -0.51, -0.50, -0.48,
23726 0.50, 0.48, -0.50, -0.48, 0.50, -0.48, 0.50, 0.48,
23727 -0.50, -0.48, -0.50, -0.68, -0.68, 0.44, 0.50, -0.64,
23728 -0.10, -0.64, -0.10, -0.40, 0.50, 0.40, 0.50, 0.40,
23729 0.50, 0.00, 0.00, -0.40, -0.50, -0.36, -0.50, 0.36,
23730 -0.50, 0.60, -0.60, 0.40, -0.40, 0.40, 0.40, -0.40,
23731 0.40, -0.40, 0.40, -0.56, -0.56, 0.36, -0.40, -0.36,
23732 0.40, 0.36, -0.40, -0.36, -0.40, 0.36, 0.40, 0.36,
23733 0.40, -0.52, 0.52, 0.52, 0.32, 0.40, -0.32, 0.40,
23734 -0.32, 0.40, -0.32, 0.40, 0.32, -0.40, -0.32, -0.40,
23735 0.32, -0.40, 0.28, -0.40, -0.28, 0.40, 0.28, -0.40,
23736 0.28, 0.40, 0.48, -0.48, 0.48, 0.36, -0.30, -0.36,
23737 -0.30, 0.00, 0.00, 0.20, 0.40, -0.44, 0.44, -0.44,
23738 -0.44, -0.44, -0.44, 0.32, -0.30, 0.32, 0.30, 0.24,
23739 0.30, -0.12, -0.10, -0.28, 0.30, 0.28, 0.30, 0.28,
23740 0.30, 0.28, -0.30, 0.28, -0.30, 0.28, -0.30, 0.28,
23741
23742 /* 2132-2259 */
23743 0.30, -0.28, 0.30, 0.40, 0.40, -0.24, 0.30, 0.24,
23744 -0.30, 0.24, -0.30, -0.24, -0.30, 0.24, 0.30, 0.24,
23745 -0.30, -0.24, 0.30, 0.24, -0.30, -0.24, -0.30, 0.24,
23746 -0.30, 0.24, 0.30, -0.24, 0.30, -0.24, 0.30, 0.20,
23747 -0.30, 0.20, -0.30, 0.20, -0.30, 0.20, 0.30, 0.20,
23748 -0.30, 0.20, -0.30, 0.20, 0.30, 0.20, 0.30, -0.20,
23749 -0.30, 0.20, -0.30, 0.20, -0.30, -0.36, -0.36, -0.36,
23750 -0.04, 0.30, 0.12, -0.10, -0.32, -0.24, 0.20, 0.24,
23751 0.20, 0.20, -0.20, -0.20, -0.20, -0.20, -0.20, 0.20,
23752 0.20, 0.20, -0.20, 0.20, 0.20, 0.20, 0.20, -0.20,
23753 -0.20, 0.00, 0.00, -0.20, -0.20, -0.20, 0.20, -0.20,
23754 0.20, 0.20, -0.20, -0.20, -0.20, 0.20, 0.20, 0.20,
23755 0.20, 0.20, -0.20, 0.20, -0.20, 0.28, 0.28, 0.28,
23756 0.28, 0.28, 0.28, -0.28, 0.28, 0.12, 0.00, 0.24,
23757 0.16, -0.20, 0.16, -0.20, 0.16, -0.20, 0.16, 0.20,
23758 -0.16, 0.20, 0.16, 0.20, -0.16, 0.20, -0.16, 0.20,
23759
23760 /* 2260-2387 */
23761 -0.16, 0.20, 0.16, -0.20, 0.16, 0.20, 0.16, -0.20,
23762 -0.16, 0.20, -0.16, -0.20, -0.16, 0.20, 0.16, 0.20,
23763 0.16, -0.20, 0.16, -0.20, 0.16, 0.20, 0.16, 0.20,
23764 0.16, 0.20, -0.16, -0.20, 0.16, 0.20, -0.16, 0.20,
23765 0.16, 0.20, -0.16, -0.20, 0.16, -0.20, 0.16, -0.20,
23766 -0.16, -0.20, 0.24, -0.24, -0.24, 0.24, 0.24, 0.12,
23767 0.20, 0.12, 0.20, -0.12, -0.20, 0.12, -0.20, 0.12,
23768 -0.20, -0.12, 0.20, -0.12, 0.20, -0.12, -0.20, 0.12,
23769 0.20, 0.12, 0.20, 0.12, -0.20, -0.12, 0.20, 0.12,
23770 -0.20, -0.12, 0.20, 0.12, 0.20, 0.00, 0.00, -0.12,
23771 0.20, -0.12, 0.20, 0.12, -0.20, -0.12, 0.20, 0.12,
23772 0.20, 0.00, -0.21, -0.20, 0.00, 0.00, 0.20, -0.20,
23773 -0.20, -0.20, 0.20, -0.16, -0.10, 0.00, 0.17, 0.16,
23774 0.16, 0.16, 0.16, -0.16, 0.16, 0.16, -0.16, 0.16,
23775 -0.16, 0.16, 0.12, 0.10, 0.12, -0.10, -0.12, 0.10,
23776 -0.12, 0.10, 0.12, -0.10, -0.12, 0.12, -0.12, 0.12,
23777
23778 /* 2388-2515 */
23779 -0.12, 0.12, -0.12, -0.12, -0.12, -0.12, -0.12, -0.12,
23780 -0.12, 0.12, 0.12, 0.12, 0.12, -0.12, -0.12, 0.12,
23781 0.12, 0.12, -0.12, 0.12, -0.12, -0.12, -0.12, 0.12,
23782 -0.12, -0.12, 0.12, 0.00, 0.11, 0.11,-122.67, 164.70,
23783 203.78, 273.50, 3.58, 2.74, 6.18, -4.56, 0.00, -0.04,
23784 0.00, -0.07, 57.44, -77.10, 95.82, 128.60, -1.77, -1.28,
23785 2.85, -2.14, 82.14, 89.50, 0.00, 0.00, 2.00, -1.84,
23786 -0.04, 47.73, -64.10, 23.79, 31.90, -1.45, -1.07, 0.69,
23787 -0.53, -46.38, 50.50, 0.00, 0.00, 1.13, 1.04, 0.02,
23788 -18.38, 0.00, 63.80, 0.00, 0.00, 0.41, 0.00, -1.43,
23789 59.07, 0.00, 0.00, 0.00, 0.00, -1.32, 57.28, 0.00,
23790 0.00, 0.00, 0.00, -1.28, -48.65, 0.00, -1.15, 0.00,
23791 0.00, 1.09, 0.00, 0.03, -18.30, 24.60, -17.30, -23.20,
23792 0.56, 0.41, -0.51, 0.39, -16.91, 26.90, 8.43, 13.30,
23793 0.60, 0.38, 0.31, -0.19, 1.23, -1.70, -19.13, -25.70,
23794 -0.03, -0.03, -0.58, 0.43, -0.72, 0.90, -17.34, -23.30,
23795
23796 /* 2516-2643 */
23797 0.03, 0.02, -0.52, 0.39, -19.49, -21.30, 0.00, 0.00,
23798 -0.48, 0.44, 0.01, 20.57, -20.10, 0.64, 0.70, -0.45,
23799 -0.46, 0.00, -0.01, 4.89, 5.90, -16.55, 19.90, 0.14,
23800 -0.11, 0.44, 0.37, 18.22, 19.80, 0.00, 0.00, 0.44,
23801 -0.41, -0.01, 4.89, -5.30, -16.51, -18.00, -0.11, -0.11,
23802 -0.41, 0.37, -17.86, 0.00, 17.10, 0.00, 0.00, 0.40,
23803 0.00, -0.38, 0.32, 0.00, 24.42, 0.00, 0.00, -0.01,
23804 0.00, -0.55, -23.79, 0.00, 0.00, 0.00, 0.00, 0.53,
23805 14.72, -16.00, -0.32, 0.00, -0.36, -0.33, -0.01, 0.01,
23806 3.34, -4.50, 11.86, 15.90, -0.11, -0.07, 0.35, -0.27,
23807 -3.26, 4.40, 11.62, 15.60, 0.09, 0.07, 0.35, -0.26,
23808 -19.53, 0.00, 5.09, 0.00, 0.00, 0.44, 0.00, -0.11,
23809 -13.48, 14.70, 0.00, 0.00, 0.33, 0.30, 0.01, 10.86,
23810 -14.60, 3.18, 4.30, -0.33, -0.24, 0.09, -0.07, -11.30,
23811 -15.10, 0.00, 0.00, -0.34, 0.25, 0.01, 2.03, -2.70,
23812 10.82, 14.50, -0.07, -0.05, 0.32, -0.24, 17.46, 0.00,
23813
23814 /* 2644-2771 */
23815 0.00, 0.00, 0.00, -0.39, 16.43, 0.00, 0.52, 0.00,
23816 0.00, -0.37, 0.00, -0.01, 9.35, 0.00, 13.29, 0.00,
23817 0.00, -0.21, 0.00, -0.30, -10.42, 11.40, 0.00, 0.00,
23818 0.25, 0.23, 0.01, 0.44, 0.50, -10.38, 11.30, 0.02,
23819 -0.01, 0.25, 0.23, -14.64, 0.00, 0.00, 0.00, 0.00,
23820 0.33, 0.56, 0.80, -8.67, 11.70, 0.02, -0.01, 0.26,
23821 0.19, 13.88, 0.00, -2.47, 0.00, 0.00, -0.31, 0.00,
23822 0.06, -1.99, 2.70, 7.72, 10.30, 0.06, 0.04, 0.23,
23823 -0.17, -0.20, 0.00, 13.05, 0.00, 0.00, 0.00, 0.00,
23824 -0.29, 6.92, -9.30, 3.34, 4.50, -0.21, -0.15, 0.10,
23825 -0.07, -6.60, 0.00, 10.70, 0.00, 0.00, 0.15, 0.00,
23826 -0.24, -8.04, -8.70, 0.00, 0.00, -0.19, 0.18, -10.58,
23827 0.00, -3.10, 0.00, 0.00, 0.24, 0.00, 0.07, -7.32,
23828 8.00, -0.12, -0.10, 0.18, 0.16, 1.63, 1.70, 6.96,
23829 -7.60, 0.03, -0.04, -0.17, -0.16, -3.62, 0.00, 9.86,
23830 0.00, 0.00, 0.08, 0.00, -0.22, 0.20, -0.20, -6.88,
23831
23832 /* 2772-2899 */
23833 -7.50, 0.00, 0.00, -0.17, 0.15, -8.99, 0.00, 4.02,
23834 0.00, 0.00, 0.20, 0.00, -0.09, -1.07, 1.40, -5.69,
23835 -7.70, 0.03, 0.02, -0.17, 0.13, 6.48, -7.20, -0.48,
23836 -0.50, -0.16, -0.14, -0.01, 0.01, 5.57, -7.50, 1.07,
23837 1.40, -0.17, -0.12, 0.03, -0.02, 8.71, 0.00, 3.54,
23838 0.00, 0.00, -0.19, 0.00, -0.08, 0.40, 0.00, 9.27,
23839 0.00, 0.00, -0.01, 0.00, -0.21, -6.13, 6.70, -1.19,
23840 -1.30, 0.15, 0.14, -0.03, 0.03, 5.21, -5.70, -2.51,
23841 -2.60, -0.13, -0.12, -0.06, 0.06, 5.69, -6.20, -0.12,
23842 -0.10, -0.14, -0.13, -0.01, 2.03, -2.70, 4.53, 6.10,
23843 -0.06, -0.05, 0.14, -0.10, 5.01, 5.50, -2.51, 2.70,
23844 0.12, -0.11, 0.06, 0.06, -1.91, 2.60, -4.38, -5.90,
23845 0.06, 0.04, -0.13, 0.10, 4.65, -6.30, 0.00, 0.00,
23846 -0.14, -0.10, -5.29, 5.70, 0.00, 0.00, 0.13, 0.12,
23847 -2.23, -4.00, -4.65, 4.20, -0.09, 0.05, 0.10, 0.10,
23848 -4.53, 6.10, 0.00, 0.00, 0.14, 0.10, 2.47, 2.70,
23849
23850 /* 2900-3027 */
23851 -4.46, 4.90, 0.06, -0.06, 0.11, 0.10, -5.05, 5.50,
23852 0.84, 0.90, 0.12, 0.11, 0.02, -0.02, 4.97, -5.40,
23853 -1.71, 0.00, -0.12, -0.11, 0.00, 0.04, -0.99, -1.30,
23854 4.22, -5.70, -0.03, 0.02, -0.13, -0.09, 0.99, 1.40,
23855 4.22, -5.60, 0.03, -0.02, -0.13, -0.09, -4.69, -5.20,
23856 0.00, 0.00, -0.12, 0.10, -3.42, 0.00, 6.09, 0.00,
23857 0.00, 0.08, 0.00, -0.14, -4.65, -5.10, 0.00, 0.00,
23858 -0.11, 0.10, 0.00, 0.00, -4.53, -5.00, 0.00, 0.00,
23859 -0.11, 0.10, -2.43, -2.70, -3.82, 4.20, -0.06, 0.05,
23860 0.10, 0.09, 0.00, 0.00, -4.53, 4.90, 0.00, 0.00,
23861 0.11, 0.10, -4.49, -4.90, 0.00, 0.00, -0.11, 0.10,
23862 2.67, -2.90, -3.62, -3.90, -0.06, -0.06, -0.09, 0.08,
23863 3.94, -5.30, 0.00, 0.00, -0.12, -3.38, 3.70, -2.78,
23864 -3.10, 0.08, 0.08, -0.07, 0.06, 3.18, -3.50, -2.82,
23865 -3.10, -0.08, -0.07, -0.07, 0.06, -5.77, 0.00, 1.87,
23866 0.00, 0.00, 0.13, 0.00, -0.04, 3.54, -4.80, -0.64,
23867
23868 /* 3028-3155 */
23869 -0.90, -0.11, 0.00, -0.02, -3.50, -4.70, 0.68, -0.90,
23870 -0.11, 0.00, -0.02, 5.49, 0.00, 0.00, 0.00, 0.00,
23871 -0.12, 1.83, -2.50, 2.63, 3.50, -0.06, 0.00, 0.08,
23872 3.02, -4.10, 0.68, 0.90, -0.09, 0.00, 0.02, 0.00,
23873 0.00, 5.21, 0.00, 0.00, 0.00, 0.00, -0.12, -3.54,
23874 3.80, 2.70, 3.60, -1.35, 1.80, 0.08, 0.00, 0.04,
23875 -2.90, 3.90, 0.68, 0.90, 0.09, 0.00, 0.02, 0.80,
23876 -1.10, -2.78, -3.70, -0.02, 0.00, -0.08, 4.10, 0.00,
23877 -2.39, 0.00, 0.00, -0.09, 0.00, 0.05, -1.59, 2.10,
23878 2.27, 3.00, 0.05, 0.00, 0.07, -2.63, 3.50, -0.48,
23879 -0.60, -2.94, -3.20, -2.94, 3.20, 2.27, -3.00, -1.11,
23880 -1.50, -0.07, 0.00, -0.03, -0.56, -0.80, -2.35, 3.10,
23881 0.00, -0.60, -3.42, 1.90, -0.12, -0.10, 2.63, -2.90,
23882 2.51, 2.80, -0.64, 0.70, -0.48, -0.60, 2.19, -2.90,
23883 0.24, -0.30, 2.15, 2.90, 2.15, -2.90, 0.52, 0.70,
23884 2.07, -2.80, -3.10, 0.00, 1.79, 0.00, 0.00, 0.07,
23885
23886 /* 3156-3283 */
23887 0.00, -0.04, 0.88, 0.00, -3.46, 2.11, 2.80, -0.36,
23888 0.50, 3.54, -0.20, -3.50, -1.39, 1.50, -1.91, -2.10,
23889 -1.47, 2.00, 1.39, 1.90, 2.07, -2.30, 0.91, 1.00,
23890 1.99, -2.70, 3.30, 0.00, 0.60, -0.44, -0.70, -1.95,
23891 2.60, 2.15, -2.40, -0.60, -0.70, 3.30, 0.84, 0.00,
23892 -3.10, -3.10, 0.00, -0.72, -0.32, 0.40, -1.87, -2.50,
23893 1.87, -2.50, 0.32, 0.40, -0.24, 0.30, -1.87, -2.50,
23894 -0.24, -0.30, 1.87, -2.50, -2.70, 0.00, 1.55, 2.03,
23895 2.20, -2.98, -1.99, -2.20, 0.12, -0.10, -0.40, 0.50,
23896 1.59, 2.10, 0.00, 0.00, -1.79, 2.00, -1.03, 1.40,
23897 -1.15, -1.60, 0.32, 0.50, 1.39, -1.90, 2.35, -1.27,
23898 1.70, 0.60, 0.80, -0.32, -0.40, 1.35, -1.80, 0.44,
23899 0.00, 2.23, -0.84, 0.90, -1.27, -1.40, -1.47, 1.60,
23900 -0.28, -0.30, -0.28, 0.40, -1.27, -1.70, 0.28, -0.40,
23901 -1.43, -1.50, 0.00, 0.00, -1.27, -1.70, 2.11, -0.32,
23902 -0.40, -1.23, 1.60, 1.19, -1.30, -0.72, -0.80, 0.72,
23903
23904 /* 3284-3411 */
23905 -0.80, -1.15, -1.30, -1.35, -1.50, -1.19, -1.60, -0.12,
23906 0.20, 1.79, 0.00, -0.88, -0.28, 0.40, 1.11, 1.50,
23907 -1.83, 0.00, 0.56, -0.12, 0.10, -1.27, -1.40, 0.00,
23908 0.00, 1.15, 1.50, -0.12, 0.20, 1.11, 1.50, 0.36,
23909 -0.50, -1.07, -1.40, -1.11, 1.50, 1.67, 0.00, 0.80,
23910 -1.11, 0.00, 1.43, 1.23, -1.30, -0.24, -1.19, -1.30,
23911 -0.24, 0.20, -0.44, -0.90, -0.95, 1.10, 1.07, -1.40,
23912 1.15, -1.30, 1.03, -1.10, -0.56, -0.60, -0.68, 0.90,
23913 -0.76, -1.00, -0.24, -0.30, 0.95, -1.30, 0.56, 0.70,
23914 0.84, -1.10, -0.56, 0.00, -1.55, 0.91, -1.30, 0.28,
23915 0.30, 0.16, -0.20, 0.95, 1.30, 0.40, -0.50, -0.88,
23916 -1.20, 0.95, -1.10, -0.48, -0.50, 0.00, 0.00, -1.07,
23917 1.20, 0.44, -0.50, 0.95, 1.10, 0.00, 0.00, 0.92,
23918 -1.30, 0.95, 1.00, -0.52, 0.60, 1.59, 0.24, -0.40,
23919 0.91, 1.20, 0.84, -1.10, -0.44, -0.60, 0.84, 1.10,
23920 -0.44, 0.60, -0.44, 0.60, -0.84, -1.10, -0.80, 0.00,
23921
23922 /* 3412-3539 */
23923 1.35, 0.76, 0.20, -0.91, -1.00, 0.20, -0.30, -0.91,
23924 -1.20, -0.95, 1.00, -0.48, -0.50, 0.88, 1.00, 0.48,
23925 -0.50, -0.95, -1.10, 0.20, -0.20, -0.99, 1.10, -0.84,
23926 1.10, -0.24, -0.30, 0.20, -0.30, 0.84, 1.10, -1.39,
23927 0.00, -0.28, -0.16, 0.20, 0.84, 1.10, 0.00, 0.00,
23928 1.39, 0.00, 0.00, -0.95, 1.00, 1.35, -0.99, 0.00,
23929 0.88, -0.52, 0.00, -1.19, 0.20, 0.20, 0.76, -1.00,
23930 0.00, 0.00, 0.76, 1.00, 0.00, 0.00, 0.76, 1.00,
23931 -0.76, 1.00, 0.00, 0.00, 1.23, 0.76, 0.80, -0.32,
23932 0.40, -0.72, 0.80, -0.40, -0.40, 0.00, 0.00, -0.80,
23933 -0.90, -0.68, 0.90, -0.16, -0.20, -0.16, -0.20, 0.68,
23934 -0.90, -0.36, 0.50, -0.56, -0.80, 0.72, -0.90, 0.44,
23935 -0.60, -0.48, -0.70, -0.16, 0.00, -1.11, 0.32, 0.00,
23936 -1.07, 0.60, -0.80, -0.28, -0.40, -0.64, 0.00, 0.91,
23937 1.11, 0.64, -0.90, 0.76, -0.80, 0.00, 0.00, -0.76,
23938 -0.80, 1.03, 0.00, -0.36, -0.64, -0.70, 0.36, -0.40,
23939
23940 /* 3540-3667 */
23941 1.07, 0.36, -0.50, -0.52, -0.70, 0.60, 0.00, 0.88,
23942 0.95, 0.00, 0.48, 0.16, -0.20, 0.60, 0.80, 0.16,
23943 -0.20, -0.60, -0.80, 0.00, -1.00, 0.12, 0.20, 0.16,
23944 -0.20, 0.68, 0.70, 0.59, -0.80, -0.99, -0.56, -0.60,
23945 0.36, -0.40, -0.68, -0.70, -0.68, -0.70, -0.36, -0.50,
23946 -0.44, 0.60, 0.64, 0.70, -0.12, 0.10, -0.52, 0.60,
23947 0.36, 0.40, 0.00, 0.00, 0.95, -0.84, 0.00, 0.44,
23948 0.56, 0.60, 0.32, -0.30, 0.00, 0.00, 0.60, 0.70,
23949 0.00, 0.00, 0.60, 0.70, -0.12, -0.20, 0.52, -0.70,
23950 0.00, 0.00, 0.56, 0.70, -0.12, 0.10, -0.52, -0.70,
23951 0.00, 0.00, 0.88, -0.76, 0.00, -0.44, 0.00, 0.00,
23952 -0.52, -0.70, 0.52, -0.70, 0.36, -0.40, -0.44, -0.50,
23953 0.00, 0.00, 0.60, 0.60, 0.84, 0.00, 0.12, -0.24,
23954 0.00, 0.80, -0.56, 0.60, -0.32, -0.30, 0.48, -0.50,
23955 0.28, -0.30, -0.48, -0.50, 0.12, 0.20, 0.48, -0.60,
23956 0.48, 0.60, -0.12, 0.20, 0.24, 0.00, 0.76, -0.52,
23957
23958 /* 3668-3795 */
23959 -0.60, -0.52, 0.60, 0.48, -0.50, -0.24, -0.30, 0.12,
23960 -0.10, 0.48, 0.60, 0.52, -0.20, 0.36, 0.40, -0.44,
23961 0.50, -0.24, -0.30, -0.48, -0.60, -0.44, -0.60, -0.12,
23962 0.10, 0.76, 0.76, 0.20, -0.20, 0.48, 0.50, 0.40,
23963 -0.50, -0.24, -0.30, 0.44, -0.60, 0.44, -0.60, 0.36,
23964 0.00, -0.64, 0.72, 0.00, -0.12, 0.00, -0.10, -0.40,
23965 -0.60, -0.20, -0.20, -0.44, 0.50, -0.44, 0.50, 0.20,
23966 0.20, -0.44, -0.50, 0.20, -0.20, -0.20, 0.20, -0.44,
23967 -0.50, 0.64, 0.00, 0.32, -0.36, 0.50, -0.20, -0.30,
23968 0.12, -0.10, 0.48, 0.50, -0.12, 0.30, -0.36, -0.50,
23969 0.00, 0.00, 0.48, 0.50, -0.48, 0.50, 0.68, 0.00,
23970 -0.12, 0.56, -0.40, 0.44, -0.50, -0.12, -0.10, 0.24,
23971 0.30, -0.40, 0.40, 0.64, 0.00, -0.24, 0.64, 0.00,
23972 -0.20, 0.00, 0.00, 0.44, -0.50, 0.44, 0.50, -0.12,
23973 0.20, -0.36, -0.50, 0.12, 0.00, 0.64, -0.40, 0.50,
23974 0.00, 0.10, 0.00, 0.00, -0.40, 0.50, 0.00, 0.00,
23975
23976 /* 3796-3923 */
23977 -0.40, -0.50, 0.56, 0.00, 0.28, 0.00, 0.10, 0.36,
23978 0.50, 0.00, -0.10, 0.36, -0.50, 0.36, 0.50, 0.00,
23979 -0.10, 0.24, -0.20, -0.36, -0.40, 0.16, 0.20, 0.40,
23980 -0.40, 0.00, 0.00, -0.36, -0.50, -0.36, -0.50, -0.32,
23981 -0.50, -0.12, 0.10, 0.20, 0.20, -0.36, 0.40, -0.60,
23982 0.60, 0.28, 0.00, 0.52, 0.12, -0.10, 0.40, 0.40,
23983 0.00, -0.50, 0.20, -0.20, -0.32, 0.40, 0.16, 0.20,
23984 -0.16, 0.20, 0.32, 0.40, 0.56, 0.00, -0.12, 0.32,
23985 -0.40, -0.16, -0.20, 0.00, 0.00, 0.40, 0.40, -0.40,
23986 -0.40, -0.40, 0.40, -0.36, 0.40, 0.12, 0.10, 0.00,
23987 0.10, 0.36, 0.40, 0.00, -0.10, 0.36, 0.40, -0.36,
23988 0.40, 0.00, 0.10, 0.32, 0.00, 0.44, 0.12, 0.20,
23989 0.28, -0.40, 0.00, 0.00, 0.36, 0.40, 0.32, -0.40,
23990 -0.16, 0.12, 0.10, 0.32, -0.40, 0.20, 0.30, -0.24,
23991 0.30, 0.00, 0.10, 0.32, 0.40, 0.00, -0.10, -0.32,
23992 -0.40, -0.32, 0.40, 0.00, 0.10, -0.52, -0.52, 0.52,
23993
23994 /* 3924-4051 */
23995 0.32, -0.40, 0.00, 0.00, 0.32, 0.40, 0.32, -0.40,
23996 0.00, 0.00, -0.32, -0.40, -0.32, 0.40, 0.32, 0.40,
23997 0.00, 0.00, 0.32, 0.40, 0.00, 0.00, -0.32, -0.40,
23998 0.00, 0.00, 0.32, 0.40, 0.16, 0.20, 0.32, -0.30,
23999 -0.16, 0.00, -0.48, -0.20, 0.20, -0.28, -0.30, 0.28,
24000 -0.40, 0.00, 0.00, 0.28, -0.40, 0.00, 0.00, 0.28,
24001 -0.40, 0.00, 0.00, -0.28, -0.40, 0.28, 0.40, -0.28,
24002 -0.40, -0.48, -0.20, 0.20, 0.24, 0.30, 0.44, 0.00,
24003 0.16, 0.24, 0.30, 0.16, -0.20, 0.24, 0.30, -0.12,
24004 0.20, 0.20, 0.30, -0.16, 0.20, 0.00, 0.00, 0.44,
24005 -0.32, 0.30, 0.24, 0.00, -0.36, 0.36, 0.00, 0.24,
24006 0.12, -0.20, 0.20, 0.30, -0.12, 0.00, -0.28, 0.30,
24007 -0.24, 0.30, 0.12, 0.10, -0.28, -0.30, -0.28, 0.30,
24008 0.00, 0.00, -0.28, -0.30, 0.00, 0.00, -0.28, -0.30,
24009 0.00, 0.00, 0.28, 0.30, 0.00, 0.00, -0.28, -0.30,
24010 -0.28, 0.30, 0.00, 0.00, -0.28, -0.30, 0.00, 0.00,
24011
24012 /* 4052-4179 */
24013 0.28, 0.30, 0.00, 0.00, -0.28, 0.30, 0.28, -0.30,
24014 -0.28, 0.30, 0.40, 0.40, -0.24, 0.30, 0.00, -0.10,
24015 0.16, 0.00, 0.36, -0.20, 0.30, -0.12, -0.10, -0.24,
24016 -0.30, 0.00, 0.00, -0.24, 0.30, -0.24, 0.30, 0.00,
24017 0.00, -0.24, 0.30, -0.24, 0.30, 0.24, -0.30, 0.00,
24018 0.00, 0.24, -0.30, 0.00, 0.00, 0.24, 0.30, 0.24,
24019 -0.30, 0.24, 0.30, -0.24, 0.30, -0.24, 0.30, -0.20,
24020 0.20, -0.16, -0.20, 0.00, 0.00, -0.32, 0.20, 0.00,
24021 0.10, 0.20, -0.30, 0.20, -0.20, 0.12, 0.20, -0.16,
24022 0.20, 0.16, 0.20, 0.20, 0.30, 0.20, 0.30, 0.00,
24023 0.00, -0.20, 0.30, 0.00, 0.00, 0.20, 0.30, -0.20,
24024 -0.30, -0.20, -0.30, 0.20, -0.30, 0.00, 0.00, 0.20,
24025 0.30, 0.00, 0.00, 0.20, 0.30, 0.00, 0.00, 0.20,
24026 0.30, 0.00, 0.00, 0.20, 0.30, 0.00, 0.00, 0.20,
24027 -0.30, 0.00, 0.00, -0.20, -0.30, 0.00, 0.00, -0.20,
24028 0.30, 0.00, 0.00, -0.20, 0.30, 0.00, 0.00, 0.36,
24029
24030 /* 4180-4307 */
24031 0.00, 0.00, 0.36, 0.12, 0.10, -0.24, 0.20, 0.12,
24032 -0.20, -0.16, -0.20, -0.13, 0.10, 0.22, 0.21, 0.20,
24033 0.00, -0.28, 0.32, 0.00, -0.12, -0.20, -0.20, 0.12,
24034 -0.10, 0.12, 0.10, -0.20, 0.20, 0.00, 0.00, -0.32,
24035 0.32, 0.00, 0.00, 0.32, 0.32, 0.00, 0.00, -0.24,
24036 -0.20, 0.24, 0.20, 0.20, 0.00, -0.24, 0.00, 0.00,
24037 -0.24, -0.20, 0.00, 0.00, 0.24, 0.20, -0.24, -0.20,
24038 0.00, 0.00, -0.24, 0.20, 0.16, -0.20, 0.12, 0.10,
24039 0.20, 0.20, 0.00, -0.10, -0.12, 0.10, -0.16, -0.20,
24040 -0.12, -0.10, -0.16, 0.20, 0.20, 0.20, 0.00, 0.00,
24041 -0.20, 0.20, -0.20, 0.20, -0.20, 0.20, -0.20, 0.20,
24042 0.20, -0.20, -0.20, -0.20, 0.00, 0.00, -0.20, 0.20,
24043 0.20, 0.00, -0.20, 0.00, 0.00, -0.20, 0.20, -0.20,
24044 0.20, -0.20, -0.20, -0.20, -0.20, 0.00, 0.00, 0.20,
24045 0.20, 0.20, 0.20, 0.12, -0.20, -0.12, -0.10, 0.28,
24046 -0.28, 0.16, -0.20, 0.00, -0.10, 0.00, 0.10, -0.16,
24047
24048 /* 4308-4435 */
24049 0.20, 0.00, -0.10, -0.16, -0.20, 0.00, -0.10, 0.16,
24050 -0.20, 0.16, -0.20, 0.00, 0.00, 0.16, 0.20, -0.16,
24051 0.20, 0.00, 0.00, 0.16, 0.20, 0.16, -0.20, 0.16,
24052 -0.20, -0.16, 0.20, 0.16, -0.20, 0.00, 0.00, 0.16,
24053 0.20, 0.00, 0.00, 0.16, 0.20, 0.00, 0.00, -0.16,
24054 -0.20, 0.16, -0.20, -0.16, -0.20, 0.00, 0.00, -0.16,
24055 -0.20, 0.00, 0.00, -0.16, 0.20, 0.00, 0.00, 0.16,
24056 -0.20, 0.16, 0.20, 0.16, 0.20, 0.00, 0.00, -0.16,
24057 -0.20, 0.00, 0.00, -0.16, -0.20, 0.00, 0.00, 0.16,
24058 0.20, 0.16, 0.20, 0.00, 0.00, 0.16, 0.20, 0.16,
24059 -0.20, 0.16, 0.20, 0.00, 0.00, -0.16, 0.20, 0.00,
24060 0.10, 0.12, -0.20, 0.12, -0.20, 0.00, -0.10, 0.00,
24061 -0.10, 0.12, 0.20, 0.00, -0.10, -0.12, 0.20, -0.15,
24062 0.20, -0.24, 0.24, 0.00, 0.00, 0.24, 0.24, 0.12,
24063 -0.20, -0.12, -0.20, 0.00, 0.00, 0.12, 0.20, 0.12,
24064 -0.20, 0.12, 0.20, 0.12, 0.20, 0.12, 0.20, 0.12,
24065
24066 /* 4436-4563 */
24067 -0.20, -0.12, 0.20, 0.00, 0.00, 0.12, 0.20, 0.12,
24068 0.00, -0.20, 0.00, 0.00, -0.12, -0.20, 0.12, -0.20,
24069 0.00, 0.00, 0.12, 0.20, -0.12, 0.20, -0.12, 0.20,
24070 0.12, -0.20, 0.00, 0.00, 0.12, 0.20, 0.20, 0.00,
24071 0.12, 0.00, 0.00, -0.12, 0.20, 0.00, 0.00, -0.12,
24072 -0.20, 0.00, 0.00, -0.12, -0.20, -0.12, -0.20, 0.00,
24073 0.00, 0.12, -0.20, 0.12, -0.20, 0.12, 0.20, -0.12,
24074 -0.20, 0.00, 0.00, 0.12, -0.20, 0.12, -0.20, 0.12,
24075 0.20, 0.12, 0.00, 0.20, -0.12, -0.20, 0.00, 0.00,
24076 0.12, 0.20, -0.16, 0.00, 0.16, -0.20, 0.20, 0.00,
24077 0.00, -0.20, 0.00, 0.00, -0.20, 0.20, 0.00, 0.00,
24078 0.20, 0.20, -0.20, 0.00, 0.00, -0.20, 0.12, 0.00,
24079 -0.16, 0.20, 0.00, 0.00, 0.20, 0.12, -0.10, 0.00,
24080 0.10, 0.16, -0.16, -0.16, -0.16, -0.16, -0.16, 0.00,
24081 0.00, -0.16, 0.00, 0.00, -0.16, -0.16, -0.16, 0.00,
24082 0.00, -0.16, 0.00, 0.00, 0.16, 0.00, 0.00, 0.16,
24083
24084 /* 4564-4691 */
24085 0.00, 0.00, 0.16, 0.16, 0.00, 0.00, -0.16, 0.00,
24086 0.00, -0.16, -0.16, 0.00, 0.00, 0.16, 0.00, 0.00,
24087 -0.16, -0.16, 0.00, 0.00, -0.16, -0.16, 0.12, 0.10,
24088 0.12, -0.10, 0.12, 0.10, 0.00, 0.00, 0.12, 0.10,
24089 -0.12, 0.10, 0.00, 0.00, 0.12, 0.10, 0.12, -0.10,
24090 0.00, 0.00, -0.12, -0.10, 0.00, 0.00, 0.12, 0.10,
24091 0.12, 0.00, 0.00, 0.12, 0.00, 0.00, -0.12, 0.00,
24092 0.00, 0.12, 0.12, 0.12, 0.12, 0.12, 0.00, 0.00,
24093 0.12, 0.00, 0.00, 0.12, 0.12, 0.00, 0.00, 0.12,
24094 0.00, 0.00, 0.12, -0.12, -0.12, 0.12, 0.12, -0.12,
24095 -0.12, 0.00, 0.00, 0.12, -0.12, 0.12, 0.12, -0.12,
24096 -0.12, 0.00, 0.00, -0.12, -0.12, 0.00, 0.00, -0.12,
24097 0.12, 0.00, 0.00, 0.12, 0.00, 0.00, 0.12, 0.00,
24098 0.00, 0.12, -0.12, 0.00, 0.00, -0.12, 0.12, -0.12,
24099 -0.12, 0.12, 0.00, 0.00, 0.12, 0.12, 0.12, -0.12,
24100 0.00, 0.00, -0.12, -0.12, -0.12, 0.00, 0.00, -0.12,
24101
24102 /* 4692-NA */
24103 -0.12, 0.00, 0.00, 0.12, 0.12, 0.00, 0.00, -0.12,
24104 -0.12, -0.12, -0.12, 0.12, 0.00, 0.00, 0.12, -0.12,
24105 0.00, 0.00, -0.12, -0.12, 0.00, 0.00, 0.12, -0.12,
24106 -0.12, -0.12, -0.12, 0.12, 0.12, -0.12, -0.12, 0.00,
24107 0.00, -0.12, 0.00, 0.00, -0.12, 0.12, 0.00, 0.00,
24108 0.12, 0.00, 0.00, -0.12, -0.12, 0.00, 0.00, -0.12,
24109 -0.12, 0.12, 0.00, 0.00, 0.12, 0.12, 0.00, 0.00,
24110 0.12, 0.00, 0.00, 0.12, 0.12, 0.08, 0.00, 0.04
24111 };
24112
24113 /* Number of amplitude coefficients */
24114 final int NA = a.length;
24115
24116 /* Amplitude usage: X or Y, sin or cos, power of T. */
24117 final int jaxy[] = {0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1};
24118 final int jasc[] = {0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0};
24119 final int japt[] = {0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4};
24120
24121 /* Miscellaneous */
24122 double t, w, pt[] = new double[MAXPT+1], fa[] = new double[14], xypr[] = new double[2], xypl[] = new double[2], xyls[] = new double[2], arg,
24123 sc[] = new double[2];
24124 int jpt, i, j, jxy, ialast, ifreq, m, ia, jsc;
24125
24126 /*--------------------------------------------------------------------*/
24127
24128 /* Interval between fundamental date J2000.0 and given date (JC). */
24129 t = ((date1 - DJ00) + date2) / DJC;
24130
24131 /* Powers of T. */
24132 w = 1.0;
24133 for (jpt = 0; jpt <= MAXPT; jpt++) {
24134 pt[jpt] = w;
24135 w *= t;
24136 }
24137
24138 /* Initialize totals in X and Y: polynomial, luni-solar, planetary. */
24139 for (jxy = 0; jxy < 2; jxy++) {
24140 xypr[jxy] = 0.0;
24141 xyls[jxy] = 0.0;
24142 xypl[jxy] = 0.0;
24143 }
24144
24145 /* --------------------------------- */
24146 /* Fundamental arguments (IERS 2003) */
24147 /* --------------------------------- */
24148
24149 /* Mean anomaly of the Moon. */
24150 fa[0] = jauFal03(t);
24151
24152 /* Mean anomaly of the Sun. */
24153 fa[1] = jauFalp03(t);
24154
24155 /* Mean argument of the latitude of the Moon. */
24156 fa[2] = jauFaf03(t);
24157
24158 /* Mean elongation of the Moon from the Sun. */
24159 fa[3] = jauFad03(t);
24160
24161 /* Mean longitude of the ascending node of the Moon. */
24162 fa[4] = jauFaom03(t);
24163
24164 /* Planetary longitudes, Mercury through Neptune. */
24165 fa[5] = jauFame03(t);
24166 fa[6] = jauFave03(t);
24167 fa[7] = jauFae03(t);
24168 fa[8] = jauFama03(t);
24169 fa[9] = jauFaju03(t);
24170 fa[10] = jauFasa03(t);
24171 fa[11] = jauFaur03(t);
24172 fa[12] = jauFane03(t);
24173
24174 /* General accumulated precession in longitude. */
24175 fa[13] = jauFapa03(t);
24176
24177 /* -------------------------------------- */
24178 /* Polynomial part of precession-nutation */
24179 /* -------------------------------------- */
24180
24181 for (jxy = 0; jxy < 2; jxy++) {
24182 for (j = MAXPT; j >= 0; j--) {
24183 xypr[jxy] += xyp[jxy][j] * pt[j];
24184 }
24185 }
24186
24187 /* ---------------------------------- */
24188 /* Nutation periodic terms, planetary */
24189 /* ---------------------------------- */
24190
24191 /* Work backwards through the coefficients per frequency list. */
24192 ialast = NA;
24193 for (ifreq = NFPL-1; ifreq >= 0; ifreq--) {
24194
24195 /* Obtain the argument functions. */
24196 arg = 0.0;
24197 for (i = 0; i < 14; i++) {
24198 m = mfapl[ifreq][i];
24199 if (m != 0) arg += (double)m * fa[i];
24200 }
24201 sc[0] = sin(arg);
24202 sc[1] = cos(arg);
24203
24204 /* Work backwards through the amplitudes at this frequency. */
24205 ia = nc[ifreq+NFLS];
24206 for (i = ialast; i >= ia; i--) {
24207
24208 /* Coefficient number (0 = 1st). */
24209 j = i-ia;
24210
24211 /* X or Y. */
24212 jxy = jaxy[j];
24213
24214 /* Sin or cos. */
24215 jsc = jasc[j];
24216
24217 /* Power of T. */
24218 jpt = japt[j];
24219
24220 /* Accumulate the component. */
24221 xypl[jxy] += a[i-1] * sc[jsc] * pt[jpt];
24222 }
24223 ialast = ia-1;
24224 }
24225
24226 /* ----------------------------------- */
24227 /* Nutation periodic terms, luni-solar */
24228 /* ----------------------------------- */
24229
24230 /* Continue working backwards through the number of coefficients list. */
24231 for (ifreq = NFLS-1; ifreq >= 0; ifreq--) {
24232
24233 /* Obtain the argument functions. */
24234 arg = 0.0;
24235 for (i = 0; i < 5; i++) {
24236 m = mfals[ifreq][i];
24237 if (m != 0) arg += (double)m * fa[i];
24238 }
24239 sc[0] = sin(arg);
24240 sc[1] = cos(arg);
24241
24242 /* Work backwards through the amplitudes at this frequency. */
24243 ia = nc[ifreq];
24244 for (i = ialast; i >= ia; i--) {
24245
24246 /* Coefficient number (0 = 1st). */
24247 j = i-ia;
24248
24249 /* X or Y. */
24250 jxy = jaxy[j];
24251
24252 /* Sin or cos. */
24253 jsc = jasc[j];
24254
24255 /* Power of T. */
24256 jpt = japt[j];
24257
24258 /* Accumulate the component. */
24259 xyls[jxy] += a[i-1] * sc[jsc] * pt[jpt];
24260 }
24261 ialast = ia-1;
24262 }
24263
24264 /* ------------------------------------ */
24265 /* Results: CIP unit vector components */
24266 /* ------------------------------------ */
24267
24268 double x = DAS2R * (xypr[0] + (xyls[0] + xypl[0]) / 1e6);
24269 double y = DAS2R * (xypr[1] + (xyls[1] + xypl[1]) / 1e6);
24270
24271 return new CelestialIntermediatePole(x, y);
24272
24273 }
24274
24275
24276 /**
24277 * For a given TT date, compute the X,Y coordinates of the Celestial
24278 * Intermediate Pole and the CIO locator s, using the IAU 2000A
24279 * precession-nutation model.
24280 *
24281 *<p>This function is derived from the International Astronomical Union's
24282 * SOFA (Standards Of Fundamental Astronomy) software collection.
24283 *
24284 *<p>Status: support function.
24285 *
24286 *<!-- Given: -->
24287 * @param date1 double TT as a 2-part Julian Date (Note 1)
24288 * @param date2 double TT as a 2-part Julian Date (Note 1)
24289 *
24290 *<!-- Returned: -->
24291 * @return x double <u>returned</u> Celestial Intermediate Pole (Note 2)
24292 * y double <u>returned</u> Celestial Intermediate Pole (Note 2)
24293 * s double <u>returned</u> the CIO locator s (Note 2)
24294 *
24295 * <p>Notes:
24296 * <ol>
24297 *
24298 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
24299 * convenient way between the two arguments. For example,
24300 * JD(TT)=2450123.7 could be expressed in any of these ways,
24301 * among others:
24302 *<pre>
24303 * date1 date2
24304 *
24305 * 2450123.7 0.0 (JD method)
24306 * 2451545.0 -1421.3 (J2000 method)
24307 * 2400000.5 50123.2 (MJD method)
24308 * 2450123.5 0.2 (date & time method)
24309 *</pre>
24310 * The JD method is the most natural and convenient to use in
24311 * cases where the loss of several decimal digits of resolution
24312 * is acceptable. The J2000 method is best matched to the way
24313 * the argument is handled internally and will deliver the
24314 * optimum resolution. The MJD method and the date & time methods
24315 * are both good compromises between resolution and convenience.
24316 *
24317 * <li> The Celestial Intermediate Pole coordinates are the x,y
24318 * components of the unit vector in the Geocentric Celestial
24319 * Reference System.
24320 *
24321 * <li> The CIO locator s (in radians) positions the Celestial
24322 * Intermediate Origin on the equator of the CIP.
24323 *
24324 * <li> A faster, but slightly less accurate result (about 1 mas for
24325 * X,Y), can be obtained by using instead the jauXys00b function.
24326 *</ol>
24327 *<p>Called:<ul>
24328 * <li>{@link #jauPnm00a} classical NPB matrix, IAU 2000A
24329 * <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
24330 * <li>{@link #jauS00} the CIO locator s, given X,Y, IAU 2000A
24331 * </ul>
24332 *<p>Reference:
24333 *
24334 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
24335 * IERS Technical Note No. 32, BKG (2004)
24336 *
24337 *@version 2008 May 12
24338 *
24339 * @since Release 20101201
24340 *
24341 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
24342 */
24343 public static ICRFrame jauXys00a(double date1, double date2)
24344 {
24345
24346 /* Form the bias-precession-nutation matrix, IAU 2000A. */
24347 double rbpn[][] = jauPnm00a(date1, date2);
24348
24349 /* Extract X,Y. */
24350 CelestialIntermediatePole cip = jauBpn2xy(rbpn);
24351
24352 /* Obtain s. */
24353 double s = jauS00(date1, date2, cip.x, cip.y);
24354
24355 return new ICRFrame(cip, s);
24356
24357 }
24358
24359
24360 /**
24361 * The Celestial Intermediate Pole coordinates are the x,y
24362 * components of the unit vector in the Geocentric Celestial
24363 * Reference System.
24364 *
24365 * The CIO locator s (in radians) positions the Celestial
24366 * Intermediate Origin on the equator of the CIP.
24367
24368 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 1 Feb 2010
24369 *
24370 * @since AIDA Stage 1
24371 */
24372 public static class ICRFrame {
24373 public CelestialIntermediatePole cip;
24374 public double s;
24375 public ICRFrame(CelestialIntermediatePole cip, double s) {
24376 this.cip = cip;
24377 this.s = s;
24378 }
24379 }
24380 /**
24381 * For a given TT date, compute the X,Y coordinates of the Celestial
24382 * Intermediate Pole and the CIO locator s, using the IAU 2000B
24383 * precession-nutation model.
24384 *
24385 *<p>This function is derived from the International Astronomical Union's
24386 * SOFA (Standards Of Fundamental Astronomy) software collection.
24387 *
24388 *<p>Status: support function.
24389 *
24390 *<!-- Given: -->
24391 * @param date1 double TT as a 2-part Julian Date (Note 1)
24392 * @param date2 double TT as a 2-part Julian Date (Note 1)
24393 *
24394 *<!-- Returned: -->
24395 * @return x double <u>returned</u> Celestial Intermediate Pole (Note 2)
24396 * y double <u>returned</u> Celestial Intermediate Pole (Note 2)
24397 * s double <u>returned</u> the CIO locator s (Note 2)
24398 *
24399 * <p>Notes:
24400 * <ol>
24401 *
24402 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
24403 * convenient way between the two arguments. For example,
24404 * JD(TT)=2450123.7 could be expressed in any of these ways,
24405 * among others:
24406 *<pre>
24407 * date1 date2
24408 *
24409 * 2450123.7 0.0 (JD method)
24410 * 2451545.0 -1421.3 (J2000 method)
24411 * 2400000.5 50123.2 (MJD method)
24412 * 2450123.5 0.2 (date & time method)
24413 *</pre>
24414 * The JD method is the most natural and convenient to use in
24415 * cases where the loss of several decimal digits of resolution
24416 * is acceptable. The J2000 method is best matched to the way
24417 * the argument is handled internally and will deliver the
24418 * optimum resolution. The MJD method and the date & time methods
24419 * are both good compromises between resolution and convenience.
24420 *
24421 * <li> The Celestial Intermediate Pole coordinates are the x,y
24422 * components of the unit vector in the Geocentric Celestial
24423 * Reference System.
24424 *
24425 * <li> The CIO locator s (in radians) positions the Celestial
24426 * Intermediate Origin on the equator of the CIP.
24427 *
24428 * <li> The present function is faster, but slightly less accurate (about
24429 * 1 mas in X,Y), than the jauXys00a function.
24430 *</ol>
24431 *<p>Called:<ul>
24432 * <li>{@link #jauPnm00b} classical NPB matrix, IAU 2000B
24433 * <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
24434 * <li>{@link #jauS00} the CIO locator s, given X,Y, IAU 2000A
24435 * </ul>
24436 *<p>Reference:
24437 *
24438 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
24439 * IERS Technical Note No. 32, BKG (2004)
24440 *
24441 *@version 2008 May 12
24442 *
24443 * @since Release 20101201
24444 *
24445 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
24446 */
24447 public static ICRFrame jauXys00b(double date1, double date2)
24448 {
24449 double rbpn[][] = new double[3][3];
24450
24451
24452 /* Form the bias-precession-nutation matrix, IAU 2000A. */
24453 rbpn = jauPnm00b(date1, date2);
24454
24455 /* Extract X,Y. */
24456 CelestialIntermediatePole cip = jauBpn2xy(rbpn);
24457
24458 /* Obtain s. */
24459 double s = jauS00(date1, date2, cip.x, cip.y);
24460
24461 return new ICRFrame(cip, s);
24462
24463 }
24464
24465
24466 /**
24467 * For a given TT date, compute the X,Y coordinates of the Celestial
24468 * Intermediate Pole and the CIO locator s, using the IAU 2006
24469 * precession and IAU 2000A nutation models.
24470 *
24471 *<p>This function is derived from the International Astronomical Union's
24472 * SOFA (Standards Of Fundamental Astronomy) software collection.
24473 *
24474 *<p>Status: support function.
24475 *
24476 *<!-- Given: -->
24477 * @param date1 double TT as a 2-part Julian Date (Note 1)
24478 * @param date2 double TT as a 2-part Julian Date (Note 1)
24479 *
24480 *<!-- Returned: -->
24481 * @return x double <u>returned</u> Celestial Intermediate Pole (Note 2)
24482 * y double <u>returned</u> Celestial Intermediate Pole (Note 2)
24483 * s double <u>returned</u> the CIO locator s (Note 2)
24484 *
24485 * <p>Notes:
24486 * <ol>
24487 *
24488 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
24489 * convenient way between the two arguments. For example,
24490 * JD(TT)=2450123.7 could be expressed in any of these ways,
24491 * among others:
24492 *<pre>
24493 * date1 date2
24494 *
24495 * 2450123.7 0.0 (JD method)
24496 * 2451545.0 -1421.3 (J2000 method)
24497 * 2400000.5 50123.2 (MJD method)
24498 * 2450123.5 0.2 (date & time method)
24499 *</pre>
24500 * The JD method is the most natural and convenient to use in
24501 * cases where the loss of several decimal digits of resolution
24502 * is acceptable. The J2000 method is best matched to the way
24503 * the argument is handled internally and will deliver the
24504 * optimum resolution. The MJD method and the date & time methods
24505 * are both good compromises between resolution and convenience.
24506 *
24507 * <li> The Celestial Intermediate Pole coordinates are the x,y components
24508 * of the unit vector in the Geocentric Celestial Reference System.
24509 *
24510 * <li> The CIO locator s (in radians) positions the Celestial
24511 * Intermediate Origin on the equator of the CIP.
24512 *
24513 * <li> Series-based solutions for generating X and Y are also available:
24514 * see Capitaine & Wallace (2006) and jauXy06.
24515 *</ol>
24516 *<p>Called:<ul>
24517 * <li>{@link #jauPnm06a} classical NPB matrix, IAU 2006/2000A
24518 * <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
24519 * <li>{@link #jauS06} the CIO locator s, given X,Y, IAU 2006
24520 * </ul>
24521 *<p>References:
24522 *
24523 * <p>Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855
24524 *
24525 * <p>Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981
24526 *
24527 *@version 2008 May 11
24528 *
24529 * @since Release 20101201
24530 *
24531 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
24532 */
24533 public static ICRFrame jauXys06a(double date1, double date2)
24534 {
24535 double rbpn[][] = new double[3][3];
24536
24537
24538 /* Form the bias-precession-nutation matrix, IAU 2000A. */
24539 rbpn = jauPnm06a(date1, date2);
24540
24541 /* Extract X,Y. */
24542 CelestialIntermediatePole cip = jauBpn2xy(rbpn);
24543
24544 /* Obtain s. */
24545 double s = jauS06(date1, date2, cip.x, cip.y);
24546
24547 return new ICRFrame(cip, s);
24548
24549 }
24550
24551
24552 /**
24553 * Zero a p-vector.
24554 *
24555 *<p>This function is derived from the International Astronomical Union's
24556 * SOFA (Standards Of Fundamental Astronomy) software collection.
24557 *
24558 *<p>Status: vector/matrix support function.
24559 *
24560 *<!-- Returned: -->
24561 * @param p double[3] <u>returned</u> p-vector
24562 *
24563 *@version 2008 May 11
24564 *
24565 * @since Release 20101201
24566 *
24567 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
24568 */
24569 public static void jauZp(double p[] )
24570 {
24571 p[0] = 0.0;
24572 p[1] = 0.0;
24573 p[2] = 0.0;
24574
24575 return;
24576
24577 }
24578
24579
24580 /**
24581 * Zero a pv-vector.
24582 *
24583 *<p>This function is derived from the International Astronomical Union's
24584 * SOFA (Standards Of Fundamental Astronomy) software collection.
24585 *
24586 *<p>Status: vector/matrix support function.
24587 *
24588 *<!-- Returned: -->
24589 * @param pv double[2][3] <u>returned</u> pv-vector
24590 *
24591 *<p>Called:<ul>
24592 * <li>{@link #jauZp} zero p-vector
24593 * </ul>
24594 *@version 2008 May 11
24595 *
24596 * @since Release 20101201
24597 *
24598 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
24599 */
24600 public static void jauZpv(double pv[][])
24601 {
24602 jauZp(pv[0]);
24603 jauZp(pv[1]);
24604
24605 return;
24606
24607 }
24608
24609
24610 /**
24611 * Initialize an r-matrix to the null matrix.
24612 *
24613 *<p>This function is derived from the International Astronomical Union's
24614 * SOFA (Standards Of Fundamental Astronomy) software collection.
24615 *
24616 *<p>Status: vector/matrix support function.
24617 *
24618 *<!-- Returned: -->
24619 * @param r double[3][3] <u>returned</u> r-matrix
24620 *
24621 *@version 2008 May 11
24622 *
24623 * @since Release 20101201
24624 *
24625 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
24626 */
24627 public static void jauZr(double r[][])
24628 {
24629 int i, j;
24630
24631
24632 for (i = 0; i < 3; i++) {
24633 for (j = 0; j < 3; j++) {
24634 r[i][j] = 0.0;
24635 }
24636 }
24637
24638 return;
24639
24640 }
24641
24642
24643 /**
24644 * returns the first argument modulo the second.
24645 * Utility function to retain C use of fmod.
24646 * @param d
24647 * @param d2
24648 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 27 Jan 2010
24649 * @return
24650 */
24651 private static double fmod(double d, double d2) {
24652 return d % d2;
24653 }
24654 //IMPL new 20131202 routines after here
24655
24656 /**
24657 * Star-independent astrometry parameters.
24658 *
24659 * (Vectors eb, eh, em and v are all with respect to BCRS axes.)
24660 *
24661 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 26 Mar 2014
24662 * @since 20131202
24663 */
24664 public static class Astrom {
24665
24666 /** PM time interval (SSB, Julian years) */
24667 public double pmt;
24668 /** SSB to observer (vector, au) [3]*/
24669 public double eb[] = new double[3];
24670 /** Sun to observer (unit vector)[3] */
24671 public double eh[] = new double[3];
24672 /** distance from Sun to observer (au) */
24673 public double em;
24674 /** barycentric observer velocity (vector, c)[3] */
24675 public double v[] = new double[3];
24676 /** sqrt(1-|v|^2): reciprocal of Lorenz factor */
24677 public double bm1;
24678 /** bias-precession-nutation matrix [3][3] */
24679 public double bpn[][] = new double[3][3];
24680 /** longitude + s' + dERA(DUT) (radians) */
24681 public double along;
24682 /** geodetic latitude (radians) */
24683 public double phi;
24684 /** polar motion xp wrt local meridian (radians) */
24685 public double xpl;
24686 /** polar motion yp wrt local meridian (radians) */
24687 public double ypl;
24688 /** sine of geodetic latitude */
24689 public double sphi;
24690 /** cosine of geodetic latitude */
24691 public double cphi;
24692 /** magnitude of diurnal aberration vector */
24693 public double diurab;
24694 /** "local" Earth rotation angle (radians) */
24695 public double eral;
24696 /** refraction constant A (radians) */
24697 public double refa;
24698 /** refraction constant B (radians) */
24699 public double refb;
24700
24701 /**
24702 *
24703 */
24704 public Astrom(){}
24705 } ;
24706
24707 /**
24708 * Body parameters for light deflection.
24709 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 26 Mar 2014
24710 * @since 20131202
24711 */
24712 public static class Ldbody {
24713 /** mass of the body (solar masses) */
24714 public double bm;
24715 /** deflection limiter (radians^2/2) */
24716 public double dl;
24717 /** barycentric PV of the body (au, au/day)[2][3] */
24718 public double pv[][] = new double [2][3];
24719 } ;
24720
24721
24722 /**
24723 * Apply aberration to transform natural direction into proper
24724 * direction.
24725 *
24726 *<p>This function is derived from the International Astronomical Union's
24727 * SOFA (Standards of Fundamental Astronomy) software collection.
24728 *
24729 *<p>Status: support function.
24730 *
24731 *<!-- Given: -->
24732 * @param pnat double[3] natural direction to the source (unit vector)
24733 * @param v double[3] observer barycentric velocity in units of c
24734 * @param s double distance between the Sun and the observer (au)
24735 * @param bm1 double sqrt(1-|v|^2): reciprocal of Lorenz factor
24736 *
24737 *<!-- Returned:-->
24738 * @return ppr double[3] <b>Returned</b> proper direction to source (unit vector)
24739 *
24740 *<p>Notes:
24741 * <ol>
24742 *
24743 * <li> The algorithm is based on Expr. (7.40) in the Explanatory
24744 * Supplement (Urban & Seidelmann 2013), but with the following
24745 * changes:
24746 *
24747 * <p>o Rigorous rather than approximate normalization is applied.
24748 *
24749 * <p>o The gravitational potential term from Expr. (7) in
24750 * Klioner (2003) is added, taking into account only the Sun's
24751 * contribution. This has a maximum effect of about
24752 * 0.4 microarcsecond.
24753 *
24754 * <li> In almost all cases, the maximum accuracy will be limited by the
24755 * supplied velocity. For example, if the SOFA iauEpv00 function is
24756 * used, errors of up to 5 microarcseconds could occur.
24757 *
24758 * </ol>
24759 *<p>References:
24760 * <ul>
24761 *
24762 * <li> Urban, S. & Seidelmann, P. K. (eds), Explanatory Supplement to
24763 * the Astronomical Almanac, 3rd ed., University Science Books
24764 * (2013).
24765 *
24766 * <li> Klioner, Sergei A., "A practical relativistic model for micro-
24767 * arcsecond astrometry in space", Astr. J. 125, 1580-1597 (2003).
24768 *
24769 * </ul>
24770 * Called:
24771 * <ul>
24772 * <li>{@link #jauPdp} scalar product of two p-vectors
24773 *
24774 * </ul>
24775 *@version 2013 October 9
24776 *
24777 *@since JSOFA release 20131202
24778 *
24779 *
24780 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
24781 */
24782 public static double[] jauAb(double pnat[], double v[], double s, double bm1
24783 )
24784 {
24785 int i;
24786 double pdv, w1, w2, r2, w, p[] = new double[3], r;
24787 double ppr[] = new double[3];
24788
24789 pdv = jauPdp(pnat, v);
24790 w1 = 1.0 + pdv/(1.0 + bm1);
24791 w2 = SRS/s;
24792 r2 = 0.0;
24793 for (i = 0; i < 3; i++) {
24794 w = pnat[i]*bm1 + w1*v[i] + w2*(v[i] - pdv*pnat[i]);
24795 p[i] = w;
24796 r2 = r2 + w*w;
24797 }
24798 r = sqrt(r2);
24799 for (i = 0; i < 3; i++) {
24800 ppr[i] = p[i]/r;
24801 }
24802 return ppr;
24803 /* Finished. */
24804
24805
24806 }
24807
24808 /**
24809 * For a geocentric observer, prepare star-independent astrometry
24810 * parameters for transformations between ICRS and GCRS coordinates.
24811 * The Earth ephemeris is supplied by the caller.
24812 *
24813 * The parameters produced by this function are required in the
24814 * parallax, light deflection and aberration parts of the astrometric
24815 * transformation chain.
24816 *
24817 *<p>This function is derived from the International Astronomical Union's
24818 * SOFA (Standards of Fundamental Astronomy) software collection.
24819 *
24820 *<p>Status: support function.
24821 *
24822 *<!-- Given: -->
24823 * @param date1 double TDB as a 2-part...
24824 * @param date2 double ...Julian Date (Note 1)
24825 * @param ebpv double[2][3] Earth barycentric pos/vel (au, au/day)
24826 * @param ehp double[3] Earth heliocentric position (au)
24827 *
24828 *<!-- Returned:-->
24829 * @param astrom jauASTROM <b>Returned</b> star-independent astrometry parameters:
24830 *
24831 *<p>Notes:
24832 * <ol>
24833 *
24834 * <li> The TDB date date1+date2 is a Julian Date, apportioned in any
24835 * convenient way between the two arguments. For example,
24836 * JD(TDB)=2450123.7 could be expressed in any of these ways, among
24837 * others:
24838 * <pre>
24839 * date1 date2
24840 *
24841 * 2450123.7 0.0 (JD method)
24842 * 2451545.0 -1421.3 (J2000 method)
24843 * 2400000.5 50123.2 (MJD method)
24844 * 2450123.5 0.2 (date & time method)
24845 * </pre>
24846 * <p>The JD method is the most natural and convenient to use in cases
24847 * where the loss of several decimal digits of resolution is
24848 * acceptable. The J2000 method is best matched to the way the
24849 * argument is handled internally and will deliver the optimum
24850 * resolution. The MJD method and the date & time methods are both
24851 * good compromises between resolution and convenience. For most
24852 * applications of this function the choice will not be at all
24853 * critical.
24854 *
24855 * <p>TT can be used instead of TDB without any significant impact on
24856 * accuracy.
24857 *
24858 * <li> All the vectors are with respect to BCRS axes.
24859 *
24860 * <li> This is one of several functions that inserts into the astrom
24861 * structure star-independent parameters needed for the chain of
24862 * astrometric transformations {@code ICRS <-> GCRS <-> CIRS <-> observed}.
24863 *
24864 * <p>The various functions support different classes of observer and
24865 * portions of the transformation chain:
24866 * <pre>{@code
24867 * functions observer transformation
24868 *
24869 * iauApcg iauApcg13 geocentric ICRS <-> GCRS
24870 * iauApci iauApci13 terrestrial ICRS <-> CIRS
24871 * iauApco iauApco13 terrestrial ICRS <-> observed
24872 * iauApcs iauApcs13 space ICRS <-> GCRS
24873 * iauAper iauAper13 terrestrial update Earth rotation
24874 * iauApio iauApio13 terrestrial CIRS <-> observed
24875 * }</pre>
24876 *
24877 * <p>Those with names ending in "13" use contemporary SOFA models to
24878 * compute the various ephemerides. The others accept ephemerides
24879 * supplied by the caller.
24880 *
24881 * <p>The transformation from ICRS to GCRS covers space motion,
24882 * parallax, light deflection, and aberration. From GCRS to CIRS
24883 * comprises frame bias and precession-nutation. From CIRS to
24884 * observed takes account of Earth rotation, polar motion, diurnal
24885 * aberration and parallax (unless subsumed into the {@code ICRS <-> GCRS}
24886 * transformation), and atmospheric refraction.
24887 *
24888 * <li> The context structure astrom produced by this function is used by
24889 * iauAtciq* and iauAticq*.
24890 *
24891 * </ol>
24892 * Called:
24893 * <ul>
24894 * <li>{@link #jauApcs} astrometry parameters, ICRS-GCRS, space observer
24895 *
24896 * </ul>
24897 *@version 2013 October 9
24898 *
24899 *@since JSOFA release 20131202
24900 *
24901 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
24902 */
24903 public static void jauApcg(double date1, double date2,
24904 double ebpv[][], double ehp[],
24905 Astrom astrom)
24906 {
24907 /* Geocentric observer */
24908 double pv[][] = { { 0.0, 0.0, 0.0 },
24909 { 0.0, 0.0, 0.0 } };
24910
24911
24912 /* Compute the star-independent astrometry parameters. */
24913 jauApcs(date1, date2, pv, ebpv, ehp, astrom);
24914
24915 /* Finished. */
24916
24917
24918 }
24919
24920 /**
24921 * For a geocentric observer, prepare star-independent astrometry
24922 * parameters for transformations between ICRS and GCRS coordinates.
24923 * The caller supplies the date, and SOFA models are used to predict
24924 * the Earth ephemeris.
24925 *
24926 * The parameters produced by this function are required in the
24927 * parallax, light deflection and aberration parts of the astrometric
24928 * transformation chain.
24929 *
24930 *<p>This function is derived from the International Astronomical Union's
24931 * SOFA (Standards of Fundamental Astronomy) software collection.
24932 *
24933 *<p>Status: support function.
24934 *
24935 *<!-- Given: -->
24936 * @param date1 double TDB as a 2-part...
24937 * @param date2 double ...Julian Date (Note 1)
24938 *
24939 *<!-- Returned:-->
24940 * @param astrom <b>Returned</b> star-independent astrometry parameters:
24941 *
24942 *<p>Notes:
24943 * <ol>
24944 *
24945 * <li> The TDB date date1+date2 is a Julian Date, apportioned in any
24946 * convenient way between the two arguments. For example,
24947 * JD(TDB)=2450123.7 could be expressed in any of these ways, among
24948 * others:
24949 * <pre>
24950 * date1 date2
24951 *
24952 * 2450123.7 0.0 (JD method)
24953 * 2451545.0 -1421.3 (J2000 method)
24954 * 2400000.5 50123.2 (MJD method)
24955 * 2450123.5 0.2 (date & time method)
24956 * </pre>
24957 * <p>The JD method is the most natural and convenient to use in cases
24958 * where the loss of several decimal digits of resolution is
24959 * acceptable. The J2000 method is best matched to the way the
24960 * argument is handled internally and will deliver the optimum
24961 * resolution. The MJD method and the date & time methods are both
24962 * good compromises between resolution and convenience. For most
24963 * applications of this function the choice will not be at all
24964 * critical.
24965 *
24966 * <p>TT can be used instead of TDB without any significant impact on
24967 * accuracy.
24968 *
24969 * <li> All the vectors are with respect to BCRS axes.
24970 *
24971 * <li> In cases where the caller wishes to supply his own Earth
24972 * ephemeris, the function iauApcg can be used instead of the present
24973 * function.
24974 *
24975 * <li> This is one of several functions that inserts into the astrom
24976 * structure star-independent parameters needed for the chain of
24977 * astrometric transformations {@code ICRS <-> GCRS <-> CIRS <-> observed}.
24978 *
24979 * <p>The various functions support different classes of observer and
24980 * portions of the transformation chain:
24981 * <pre>
24982 * {@code
24983 * functions observer transformation
24984 *
24985 * iauApcg iauApcg13 geocentric ICRS <-> GCRS
24986 * iauApci iauApci13 terrestrial ICRS <-> CIRS
24987 * iauApco iauApco13 terrestrial ICRS <-> observed
24988 * iauApcs iauApcs13 space ICRS <-> GCRS
24989 * iauAper iauAper13 terrestrial update Earth rotation
24990 * iauApio iauApio13 terrestrial CIRS <-> observed
24991 * }
24992 * </pre>
24993 * <p>Those with names ending in "13" use contemporary SOFA models to
24994 * compute the various ephemerides. The others accept ephemerides
24995 * supplied by the caller.
24996 *
24997 * <p>The transformation from ICRS to GCRS covers space motion,
24998 * parallax, light deflection, and aberration. From GCRS to CIRS
24999 * comprises frame bias and precession-nutation. From CIRS to
25000 * observed takes account of Earth rotation, polar motion, diurnal
25001 * aberration and parallax (unless subsumed into the {@code ICRS <-> GCRS}
25002 * transformation), and atmospheric refraction.
25003 *
25004 * <li> The context structure astrom produced by this function is used by
25005 * iauAtciq* and iauAticq*.
25006 *
25007 * </ol>
25008 * Called:
25009 * <ul>
25010 * <li>{@link #jauEpv00} Earth position and velocity
25011 * <li>{@link #jauApcg} astrometry parameters, ICRS-GCRS, geocenter
25012 *
25013 * </ul>
25014 *@version 2013 October 9
25015 *
25016 *@since JSOFA release 20131202
25017 *
25018 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
25019 */
25020 public static void jauApcg13(double date1, double date2, Astrom astrom)
25021 {
25022 double ehpv[][] = new double[2][3], ebpv[][] = new double[2][3];
25023
25024
25025 /* Earth barycentric & heliocentric position/velocity (au, au/d). */
25026 jauEpv00(date1, date2, ehpv, ebpv);
25027
25028 /* Compute the star-independent astrometry parameters. */
25029 jauApcg(date1, date2, ebpv, ehpv[0], astrom);
25030
25031 /* Finished. */
25032
25033
25034 }
25035
25036 /**
25037 * For a terrestrial observer, prepare star-independent astrometry
25038 * parameters for transformations between ICRS and geocentric CIRS
25039 * coordinates. The Earth ephemeris and CIP/CIO are supplied by the
25040 * caller.
25041 *
25042 * The parameters produced by this function are required in the
25043 * parallax, light deflection, aberration, and bias-precession-nutation
25044 * parts of the astrometric transformation chain.
25045 *
25046 *<p>This function is derived from the International Astronomical Union's
25047 * SOFA (Standards of Fundamental Astronomy) software collection.
25048 *
25049 *<p>Status: support function.
25050 *
25051 *<!-- Given: -->
25052 * @param date1 double TDB as a 2-part...
25053 * @param date2 double ...Julian Date (Note 1)
25054 * @param ebpv double[2][3] Earth barycentric position/velocity (au, au/day)
25055 * @param ehp double[3] Earth heliocentric position (au)
25056 * @param x double CIP X,Y (components of unit vector)
25057 * @param y double CIP X,Y (components of unit vector)
25058 * @param s double the CIO locator s (radians)
25059 *
25060 *<!-- Returned:-->
25061 * @param astrom <b>Returned</b> star-independent astrometry parameters:
25062 *
25063 *<p>Notes:
25064 * <ol>
25065 *
25066 * <li> The TDB date date1+date2 is a Julian Date, apportioned in any
25067 * convenient way between the two arguments. For example,
25068 * JD(TDB)=2450123.7 could be expressed in any of these ways, among
25069 * others:
25070 * <pre>
25071 * date1 date2
25072 *
25073 * 2450123.7 0.0 (JD method)
25074 * 2451545.0 -1421.3 (J2000 method)
25075 * 2400000.5 50123.2 (MJD method)
25076 * 2450123.5 0.2 (date & time method)
25077 * </pre>
25078 * <p>The JD method is the most natural and convenient to use in cases
25079 * where the loss of several decimal digits of resolution is
25080 * acceptable. The J2000 method is best matched to the way the
25081 * argument is handled internally and will deliver the optimum
25082 * resolution. The MJD method and the date & time methods are both
25083 * good compromises between resolution and convenience. For most
25084 * applications of this function the choice will not be at all
25085 * critical.
25086 *
25087 * <p>TT can be used instead of TDB without any significant impact on
25088 * accuracy.
25089 *
25090 * <li> All the vectors are with respect to BCRS axes.
25091 *
25092 * <li> In cases where the caller does not wish to provide the Earth
25093 * ephemeris and CIP/CIO, the function iauApci13 can be used instead
25094 * of the present function. This computes the required quantities
25095 * using other SOFA functions.
25096 *
25097 * <li> This is one of several functions that inserts into the astrom
25098 * structure star-independent parameters needed for the chain of
25099 * astrometric transformations {@code ICRS <-> GCRS <-> CIRS <-> observed.}
25100 *
25101 * <p>The various functions support different classes of observer and
25102 * portions of the transformation chain:
25103 * <pre>{@code
25104 * functions observer transformation
25105 *
25106 * iauApcg iauApcg13 geocentric ICRS <-> GCRS
25107 * iauApci iauApci13 terrestrial ICRS <-> CIRS
25108 * iauApco iauApco13 terrestrial ICRS <-> observed
25109 * iauApcs iauApcs13 space ICRS <-> GCRS
25110 * iauAper iauAper13 terrestrial update Earth rotation
25111 * iauApio iauApio13 terrestrial CIRS <-> observed
25112 * }</pre>
25113 * <p>Those with names ending in "13" use contemporary SOFA models to
25114 * compute the various ephemerides. The others accept ephemerides
25115 * supplied by the caller.
25116 *
25117 * <p>The transformation from ICRS to GCRS covers space motion,
25118 * parallax, light deflection, and aberration. From GCRS to CIRS
25119 * comprises frame bias and precession-nutation. From CIRS to
25120 * observed takes account of Earth rotation, polar motion, diurnal
25121 * aberration and parallax (unless subsumed into the {@code ICRS <-> GCRS}
25122 * transformation), and atmospheric refraction.
25123 *
25124 * <li> The context structure astrom produced by this function is used by
25125 * iauAtciq* and iauAticq*.
25126 *
25127 * </ol>
25128 * Called:
25129 * <ul>
25130 * <li>{@link #jauApcg} astrometry parameters, ICRS-GCRS, geocenter
25131 * <li>{@link #jauC2ixys} celestial-to-intermediate matrix, given X,Y and s
25132 *
25133 * </ul>
25134 *@version 2013 September 25
25135 *
25136 *@since JSOFA release 20131202
25137 *
25138 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
25139 */
25140 public static void jauApci(double date1, double date2,
25141 double ebpv[][], double ehp[],
25142 double x, double y, double s,
25143 Astrom astrom)
25144 {
25145
25146 /* Star-independent astrometry parameters for geocenter. */
25147 jauApcg(date1, date2, ebpv, ehp, astrom);
25148
25149 /* CIO based BPN matrix. */
25150 astrom.bpn = jauC2ixys(x, y, s);
25151
25152 /* Finished. */
25153
25154
25155 }
25156
25157 /**
25158 * For a terrestrial observer, prepare star-independent astrometry
25159 * parameters for transformations between ICRS and geocentric CIRS
25160 * coordinates. The caller supplies the date, and SOFA models are used
25161 * to predict the Earth ephemeris and CIP/CIO.
25162 *
25163 * The parameters produced by this function are required in the
25164 * parallax, light deflection, aberration, and bias-precession-nutation
25165 * parts of the astrometric transformation chain.
25166 *
25167 *<p>This function is derived from the International Astronomical Union's
25168 * SOFA (Standards of Fundamental Astronomy) software collection.
25169 *
25170 *<p>Status: support function.
25171 *
25172 *<!-- Given: -->
25173 * @param date1 double TDB as a 2-part...
25174 * @param date2 double ...Julian Date (Note 1)
25175 *
25176 *<!-- Returned:-->
25177 * @param astrom jauASTROM <b>Returned</b> star-independent astrometry parameters:
25178 * pmt double <b>Returned</b> PM time interval (SSB, Julian years)
25179 * eb double[3] <b>Returned</b> SSB to observer (vector, au)
25180 * eh double[3] <b>Returned</b> Sun to observer (unit vector)
25181 * em double <b>Returned</b> distance from Sun to observer (au)
25182 * v double[3] <b>Returned</b> barycentric observer velocity (vector, c)
25183 * bm1 double <b>Returned</b> sqrt(1-|v|^2): reciprocal of Lorenz factor
25184 * bpn double[3][3] <b>Returned</b> bias-precession-nutation matrix
25185 * along double <b>Returned</b> unchanged
25186 * xpl double <b>Returned</b> unchanged
25187 * ypl double <b>Returned</b> unchanged
25188 * sphi double <b>Returned</b> unchanged
25189 * cphi double <b>Returned</b> unchanged
25190 * diurab double <b>Returned</b> unchanged
25191 * eral double <b>Returned</b> unchanged
25192 * refa double <b>Returned</b> unchanged
25193 * refb double <b>Returned</b> unchanged
25194 * @return double* <b>Returned</b> equation of the origins (ERA-GST)
25195 *
25196 *<p>Notes:
25197 * <ol>
25198 *
25199 * <li> The TDB date date1+date2 is a Julian Date, apportioned in any
25200 * convenient way between the two arguments. For example,
25201 * JD(TDB)=2450123.7 could be expressed in any of these ways, among
25202 * others:
25203 * <pre>
25204 * date1 date2
25205 *
25206 * 2450123.7 0.0 (JD method)
25207 * 2451545.0 -1421.3 (J2000 method)
25208 * 2400000.5 50123.2 (MJD method)
25209 * 2450123.5 0.2 (date & time method)
25210 * </pre>
25211 * <p>The JD method is the most natural and convenient to use in cases
25212 * where the loss of several decimal digits of resolution is
25213 * acceptable. The J2000 method is best matched to the way the
25214 * argument is handled internally and will deliver the optimum
25215 * resolution. The MJD method and the date & time methods are both
25216 * good compromises between resolution and convenience. For most
25217 * applications of this function the choice will not be at all
25218 * critical.
25219 *
25220 * <p>TT can be used instead of TDB without any significant impact on
25221 * accuracy.
25222 *
25223 * <li> All the vectors are with respect to BCRS axes.
25224 *
25225 * <li> In cases where the caller wishes to supply his own Earth
25226 * ephemeris and CIP/CIO, the function iauApci can be used instead
25227 * of the present function.
25228 *
25229 * <li> This is one of several functions that inserts into the astrom
25230 * structure star-independent parameters needed for the chain of
25231 * astrometric transformations {@code ICRS <-> GCRS <-> CIRS <-> observed.}
25232 *
25233 * <p>The various functions support different classes of observer and
25234 * portions of the transformation chain:
25235 * <pre>{@code
25236 * functions observer transformation
25237 *
25238 * iauApcg iauApcg13 geocentric ICRS <-> GCRS
25239 * iauApci iauApci13 terrestrial ICRS <-> CIRS
25240 * iauApco iauApco13 terrestrial ICRS <-> observed
25241 * iauApcs iauApcs13 space ICRS <-> GCRS
25242 * iauAper iauAper13 terrestrial update Earth rotation
25243 * iauApio iauApio13 terrestrial CIRS <-> observed
25244 * }</pre>
25245 * <p>Those with names ending in "13" use contemporary SOFA models to
25246 * compute the various ephemerides. The others accept ephemerides
25247 * supplied by the caller.
25248 *
25249 * <p>The transformation from ICRS to GCRS covers space motion,
25250 * parallax, light deflection, and aberration. From GCRS to CIRS
25251 * comprises frame bias and precession-nutation. From CIRS to
25252 * observed takes account of Earth rotation, polar motion, diurnal
25253 * aberration and parallax (unless subsumed into the {@code ICRS <-> GCRS}
25254 * transformation), and atmospheric refraction.
25255 *
25256 * <li> The context structure astrom produced by this function is used by
25257 * iauAtciq* and iauAticq*.
25258 *
25259 * </ol>
25260 * Called:
25261 * <ul>
25262 * <li>{@link #jauEpv00} Earth position and velocity
25263 * <li>{@link #jauPnm06a} classical NPB matrix, IAU 2006/2000A
25264 * <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
25265 * <li>{@link #jauS06} the CIO locator s, given X,Y, IAU 2006
25266 * <li>{@link #jauApci} astrometry parameters, ICRS-CIRS
25267 * <li>{@link #jauEors} equation of the origins, given NPB matrix and s
25268 *
25269 * </ul>
25270 *@version 2013 October 9
25271 *
25272 *@since JSOFA release 20131202
25273 *
25274 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
25275 */
25276 public static double jauApci13(double date1, double date2,
25277 Astrom astrom)
25278 {
25279 double ehpv[][] = new double[2][3], ebpv[][] = new double[2][3], r[][], s;
25280
25281
25282 /* Earth barycentric & heliocentric position/velocity (au, au/d). */
25283 jauEpv00(date1, date2, ehpv, ebpv);
25284
25285 /* Form the equinox based BPN matrix, IAU 2006/2000A. */
25286 r = jauPnm06a(date1, date2);
25287
25288 /* Extract CIP X,Y. */
25289 CelestialIntermediatePole cip = jauBpn2xy(r);
25290
25291 /* Obtain CIO locator s. */
25292 s = jauS06(date1, date2, cip.x, cip.y);
25293
25294 /* Compute the star-independent astrometry parameters. */
25295 jauApci(date1, date2, ebpv, ehpv[0], cip.x, cip.y, s, astrom);
25296
25297 /* Equation of the origins. */
25298 return jauEors(r, s);
25299
25300 /* Finished. */
25301
25302
25303 }
25304
25305 /**
25306 * For a terrestrial observer, prepare star-independent astrometry
25307 * parameters for transformations between ICRS and observed
25308 * coordinates. The caller supplies the Earth ephemeris, the Earth
25309 * rotation information and the refraction constants as well as the
25310 * site coordinates.
25311 *
25312 *<p>This function is derived from the International Astronomical Union's
25313 * SOFA (Standards of Fundamental Astronomy) software collection.
25314 *
25315 *<p>Status: support function.
25316 *
25317 *<!-- Given: -->
25318 * @param date1 double TDB as a 2-part...
25319 * @param date2 double ...Julian Date (Note 1)
25320 * @param ebpv double[2][3] Earth barycentric PV (au, au/day, Note 2)
25321 * @param ehp double[3] Earth heliocentric P (au, Note 2)
25322 * @param x double CIP X,Y (components of unit vector)
25323 * @param y double CIP X,Y (components of unit vector)
25324 * @param s double the CIO locator s (radians)
25325 * @param theta double Earth rotation angle (radians)
25326 * @param elong double longitude (radians, east +ve, Note 3)
25327 * @param phi double latitude (geodetic, radians, Note 3)
25328 * @param hm double height above ellipsoid (m, geodetic, Note 3)
25329 * @param xp double polar motion coordinates (radians, Note 4)
25330 * @param yp double polar motion coordinates (radians, Note 4)
25331 * @param sp double the TIO locator s' (radians, Note 4)
25332 * @param refa double refraction constant A (radians, Note 5)
25333 * @param refb double refraction constant B (radians, Note 5)
25334 *
25335 *<!-- Returned:-->
25336 * @param astrom <b>Returned</b> star-independent astrometry parameters:
25337 *
25338 *<p>Notes:
25339 * <ol>
25340 *
25341 * <li> The TDB date date1+date2 is a Julian Date, apportioned in any
25342 * convenient way between the two arguments. For example,
25343 * JD(TDB)=2450123.7 could be expressed in any of these ways, among
25344 * others:
25345 * <pre>
25346 * date1 date2
25347 *
25348 * 2450123.7 0.0 (JD method)
25349 * 2451545.0 -1421.3 (J2000 method)
25350 * 2400000.5 50123.2 (MJD method)
25351 * 2450123.5 0.2 (date & time method)
25352 * </pre>
25353 * <p>The JD method is the most natural and convenient to use in cases
25354 * where the loss of several decimal digits of resolution is
25355 * acceptable. The J2000 method is best matched to the way the
25356 * argument is handled internally and will deliver the optimum
25357 * resolution. The MJD method and the date & time methods are both
25358 * good compromises between resolution and convenience. For most
25359 * applications of this function the choice will not be at all
25360 * critical.
25361 *
25362 * <p>TT can be used instead of TDB without any significant impact on
25363 * accuracy.
25364 *
25365 * <li> The vectors eb, eh, and all the astrom vectors, are with respect
25366 * to BCRS axes.
25367 *
25368 * <li> The geographical coordinates are with respect to the WGS84
25369 * reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN
25370 * CONVENTION: the longitude required by the present function is
25371 * right-handed, i.e. east-positive, in accordance with geographical
25372 * convention.
25373 *
25374 * <li> xp and yp are the coordinates (in radians) of the Celestial
25375 * Intermediate Pole with respect to the International Terrestrial
25376 * Reference System (see IERS Conventions), measured along the
25377 * meridians 0 and 90 deg west respectively. sp is the TIO locator
25378 * s', in radians, which positions the Terrestrial Intermediate
25379 * Origin on the equator. For many applications, xp, yp and
25380 * (especially) sp can be set to zero.
25381 *
25382 * <p>Internally, the polar motion is stored in a form rotated onto the
25383 * local meridian.
25384 *
25385 * <li> The refraction constants refa and refb are for use in a
25386 * dZ = A*tan(Z)+B*tan^3(Z) model, where Z is the observed
25387 * (i.e. refracted) zenith distance and dZ is the amount of
25388 * refraction.
25389 *
25390 * <li> It is advisable to take great care with units, as even unlikely
25391 * values of the input parameters are accepted and processed in
25392 * accordance with the models used.
25393 *
25394 * <li> In cases where the caller does not wish to provide the Earth
25395 * Ephemeris, the Earth rotation information and refraction
25396 * constants, the function iauApco13 can be used instead of the
25397 * present function. This starts from UTC and weather readings etc.
25398 * and computes suitable values using other SOFA functions.
25399 *
25400 * <li> This is one of several functions that inserts into the astrom
25401 * structure star-independent parameters needed for the chain of
25402 * astrometric transformations {@code ICRS <-> GCRS <-> CIRS <-> observed.}
25403 *
25404 * <p>The various functions support different classes of observer and
25405 * portions of the transformation chain:
25406 * <pre>{@code
25407 * functions observer transformation
25408 *
25409 * iauApcg iauApcg13 geocentric ICRS <-> GCRS
25410 * iauApci iauApci13 terrestrial ICRS <-> CIRS
25411 * iauApco iauApco13 terrestrial ICRS <-> observed
25412 * iauApcs iauApcs13 space ICRS <-> GCRS
25413 * iauAper iauAper13 terrestrial update Earth rotation
25414 * iauApio iauApio13 terrestrial CIRS <-> observed
25415 * }</pre>
25416 * <p>Those with names ending in "13" use contemporary SOFA models to
25417 * compute the various ephemerides. The others accept ephemerides
25418 * supplied by the caller.
25419 *
25420 * <p>The transformation from ICRS to GCRS covers space motion,
25421 * parallax, light deflection, and aberration. From GCRS to CIRS
25422 * comprises frame bias and precession-nutation. From CIRS to
25423 * observed takes account of Earth rotation, polar motion, diurnal
25424 * aberration and parallax (unless subsumed into the {@code ICRS <-> GCRS}
25425 * transformation), and atmospheric refraction.
25426 *
25427 * <li> The context structure astrom produced by this function is used by
25428 * iauAtioq, iauAtoiq, iauAtciq* and iauAticq*.
25429 *
25430 * </ol>
25431 * Called:
25432 * <ul>
25433 * <li>{@link #jauAper} astrometry parameters: update ERA
25434 * <li>{@link #jauC2ixys} celestial-to-intermediate matrix, given X,Y and s
25435 * <li>{@link #jauPvtob} position/velocity of terrestrial station
25436 * <li>{@link #jauTrxpv} product of transpose of r-matrix and pv-vector
25437 * <li>{@link #jauApcs} astrometry parameters, ICRS-GCRS, space observer
25438 * <li>{@link #jauCr} copy r-matrix
25439 *
25440 * </ul>
25441 *@version 2013 October 9
25442 *
25443 *@since JSOFA release 20131202
25444 *
25445 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
25446 * @throws JSOFAInternalError an internal error has occured
25447 * @throws JSOFAIllegalParameter
25448 */
25449 public static void jauApco(double date1, double date2,
25450 double ebpv[][], double ehp[],
25451 double x, double y, double s, double theta,
25452 double elong, double phi, double hm,
25453 double xp, double yp, double sp,
25454 double refa, double refb,
25455 Astrom astrom) throws JSOFAIllegalParameter, JSOFAInternalError
25456 {
25457 double sl, cl, r[][], pvc[][], pv[][];
25458
25459
25460 /* Longitude with adjustment for TIO locator s'. */
25461 astrom.along = elong + sp;
25462
25463 /* Polar motion, rotated onto the local meridian. */
25464 sl = sin(astrom.along);
25465 cl = cos(astrom.along);
25466 astrom.xpl = xp*cl - yp*sl;
25467 astrom.ypl = xp*sl + yp*cl;
25468
25469 /* Functions of latitude. */
25470 astrom.sphi = sin(phi);
25471 astrom.cphi = cos(phi);
25472
25473 /* Refraction constants. */
25474 astrom.refa = refa;
25475 astrom.refb = refb;
25476
25477 /* Local Earth rotation angle. */
25478 jauAper(theta, astrom);
25479
25480 /* Disable the (redundant) diurnal aberration step. */
25481 astrom.diurab = 0.0;
25482
25483 /* CIO based BPN matrix. */
25484 r = jauC2ixys(x, y, s);
25485
25486 /* Observer's geocentric position and velocity (m, m/s, CIRS). */
25487 pvc = jauPvtob(elong, phi, hm, xp, yp, sp, theta);
25488
25489 /* Rotate into GCRS. */
25490 pv = jauTrxpv(r, pvc);
25491
25492 /* ICRS <-> GCRS parameters. */
25493 jauApcs(date1, date2, pv, ebpv, ehp, astrom);
25494
25495 /* Store the CIO based BPN matrix. */
25496 jauCr(r, astrom.bpn );
25497
25498 /* Finished. */
25499
25500
25501 }
25502
25503 /**
25504 * For a terrestrial observer, prepare star-independent astrometry
25505 * parameters for transformations between ICRS and observed
25506 * coordinates. The caller supplies UTC, site coordinates, ambient air
25507 * conditions and observing wavelength, and SOFA models are used to
25508 * obtain the Earth ephemeris, CIP/CIO and refraction constants.
25509 *
25510 * The parameters produced by this function are required in the
25511 * parallax, light deflection, aberration, and bias-precession-nutation
25512 * parts of the ICRS/CIRS transformations.
25513 *
25514 *<p>This function is derived from the International Astronomical Union's
25515 * SOFA (Standards of Fundamental Astronomy) software collection.
25516 *
25517 *<p>Status: support function.
25518 *
25519 *<!-- Given: -->
25520 * @param utc1 double UTC as a 2-part...
25521 * @param utc2 double ...quasi Julian Date (Notes 1,2)
25522 * @param dut1 double UT1-UTC (seconds, Note 3)
25523 * @param elong double longitude (radians, east +ve, Note 4)
25524 * @param phi double latitude (geodetic, radians, Note 4)
25525 * @param hm double height above ellipsoid (m, geodetic, Notes 4,6)
25526 * @param xp double polar motion coordinates (radians, Note 5)
25527 * @param yp double polar motion coordinates (radians, Note 5)
25528 * @param phpa double pressure at the observer (hPa = mB, Note 6)
25529 * @param tc double ambient temperature at the observer (deg C)
25530 * @param rh double relative humidity at the observer (range 0-1)
25531 * @param wl double wavelength (micrometers, Note 7)
25532 *
25533 *<!-- Returned:-->
25534 * @param astrom <b>Returned</b> star-independent astrometry parameters:
25535 *
25536 *
25537 * @return double <b>Returned</b> equation of the origins (ERA-GST)
25538 *
25539 * @throws JSOFAInternalError an internal error has occured
25540 * @throws JSOFAIllegalParameter int status: <b>Returned</b> +1 = dubious year (Note 2)
25541 * 0 = <b>Returned</b> OK
25542 * -1 = <b>Returned</b> unacceptable date
25543 *
25544 *<p>Notes:
25545 * <ol>
25546 *
25547 * <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
25548 * convenient way between the two arguments, for example where utc1
25549 * is the Julian Day Number and utc2 is the fraction of a day.
25550 *
25551 * <p>However, JD cannot unambiguously represent UTC during a leap
25552 * second unless special measures are taken. The convention in the
25553 * present function is that the JD day represents UTC days whether
25554 * the length is 86399, 86400 or 86401 SI seconds.
25555 *
25556 * <p>Applications should use the function iauDtf2d to convert from
25557 * calendar date and time of day into 2-part quasi Julian Date, as
25558 * it implements the leap-second-ambiguity convention just
25559 * described.
25560 *
25561 * <li> The warning status "dubious year" flags UTCs that predate the
25562 * introduction of the time scale or that are too far in the
25563 * future to be trusted. See iauDat for further details.
25564 *
25565 * <li> UT1-UTC is tabulated in IERS bulletins. It increases by exactly
25566 * one second at the end of each positive UTC leap second,
25567 * introduced in order to keep UT1-UTC within +/- 0.9s. n.b. This
25568 * practice is under review, and in the future UT1-UTC may grow
25569 * essentially without limit.
25570 *
25571 * <li> The geographical coordinates are with respect to the WGS84
25572 * reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN: the
25573 * longitude required by the present function is east-positive
25574 * (i.e. right-handed), in accordance with geographical convention.
25575 *
25576 * <li> The polar motion xp,yp can be obtained from IERS bulletins. The
25577 * values are the coordinates (in radians) of the Celestial
25578 * Intermediate Pole with respect to the International Terrestrial
25579 * Reference System (see IERS Conventions 2003), measured along the
25580 * meridians 0 and 90 deg west respectively. For many
25581 * applications, xp and yp can be set to zero.
25582 *
25583 * <p>Internally, the polar motion is stored in a form rotated onto
25584 * the local meridian.
25585 *
25586 * <li> If hm, the height above the ellipsoid of the observing station
25587 * in meters, is not known but phpa, the pressure in hPa (=mB), is
25588 * available, an adequate estimate of hm can be obtained from the
25589 * expression
25590 *
25591 * <p>hm = -29.3 * tsl * log ( phpa / 1013.25 );
25592 *
25593 * <p>where tsl is the approximate sea-level air temperature in K
25594 * (See Astrophysical Quantities, C.W.Allen, 3rd edition, section
25595 * 52). Similarly, if the pressure phpa is not known, it can be
25596 * estimated from the height of the observing station, hm, as
25597 * follows:
25598 *
25599 * <p>phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) );
25600 *
25601 * <p>Note, however, that the refraction is nearly proportional to
25602 * the pressure and that an accurate phpa value is important for
25603 * precise work.
25604 *
25605 * <li> The argument wl specifies the observing wavelength in
25606 * micrometers. The transition from optical to radio is assumed to
25607 * occur at 100 micrometers (about 3000 GHz).
25608 *
25609 * <li> It is advisable to take great care with units, as even unlikely
25610 * values of the input parameters are accepted and processed in
25611 * accordance with the models used.
25612 *
25613 * <li> In cases where the caller wishes to supply his own Earth
25614 * ephemeris, Earth rotation information and refraction constants,
25615 * the function iauApco can be used instead of the present function.
25616 *
25617 * <li> This is one of several functions that inserts into the astrom
25618 * structure star-independent parameters needed for the chain of
25619 * astrometric transformations {@code ICRS <-> GCRS <-> CIRS <-> observed.}
25620 *
25621 * <p>The various functions support different classes of observer and
25622 * portions of the transformation chain:
25623 * <pre>{@code
25624 * functions observer transformation
25625 *
25626 * iauApcg iauApcg13 geocentric ICRS <-> GCRS
25627 * iauApci iauApci13 terrestrial ICRS <-> CIRS
25628 * iauApco iauApco13 terrestrial ICRS <-> observed
25629 * iauApcs iauApcs13 space ICRS <-> GCRS
25630 * iauAper iauAper13 terrestrial update Earth rotation
25631 * iauApio iauApio13 terrestrial CIRS <-> observed
25632 * }</pre>
25633 * <p>Those with names ending in "13" use contemporary SOFA models to
25634 * compute the various ephemerides. The others accept ephemerides
25635 * supplied by the caller.
25636 *
25637 * <p>The transformation from ICRS to GCRS covers space motion,
25638 * parallax, light deflection, and aberration. From GCRS to CIRS
25639 * comprises frame bias and precession-nutation. From CIRS to
25640 * observed takes account of Earth rotation, polar motion, diurnal
25641 * aberration and parallax (unless subsumed into the {@code ICRS <-> GCRS}
25642 * transformation), and atmospheric refraction.
25643 *
25644 * <li> The context structure astrom produced by this function is used
25645 * by iauAtioq, iauAtoiq, iauAtciq* and iauAticq*.
25646 *
25647 * </ol>
25648 * Called:
25649 * <ul>
25650 * <li>{@link #jauUtctai} UTC to TAI
25651 * <li>{@link #jauTaitt} TAI to TT
25652 * <li>{@link #jauUtcut1} UTC to UT1
25653 * <li>{@link #jauEpv00} Earth position and velocity
25654 * <li>{@link #jauPnm06a} classical NPB matrix, IAU 2006/2000A
25655 * <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
25656 * <li>{@link #jauS06} the CIO locator s, given X,Y, IAU 2006
25657 * <li>{@link #jauEra00} Earth rotation angle, IAU 2000
25658 * <li>{@link #jauSp00} the TIO locator s', IERS 2000
25659 * <li>{@link #jauRefco} refraction constants for given ambient conditions
25660 * <li>{@link #jauApco} astrometry parameters, ICRS-observed
25661 * <li>{@link #jauEors} equation of the origins, given NPB matrix and s
25662 *
25663 * </ul>
25664 *@version 2013 December 5
25665 *
25666 *@since JSOFA release 20131202
25667 *
25668 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
25669 * @throws JSOFAInternalError an internal error has occured
25670 * @throws JSOFAIllegalParameter
25671 */
25672 public static double jauApco13(double utc1, double utc2, double dut1,
25673 double elong, double phi, double hm, double xp, double yp,
25674 double phpa, double tc, double rh, double wl,
25675 Astrom astrom ) throws JSOFAIllegalParameter, JSOFAInternalError
25676 {
25677 double ehpv[][] = new double[2][3], ebpv[][] = new double[2][3],
25678 r[][], s, theta, sp;
25679 double eo;
25680
25681
25682 /* UTC to other time scales. */
25683 JulianDate tai = jauUtctai(utc1, utc2);
25684 JulianDate tt = jauTaitt(tai.djm0, tai.djm1);
25685 JulianDate ut1 = jauUtcut1(utc1, utc2, dut1);
25686
25687 /* Earth barycentric & heliocentric position/velocity (au, au/d). */
25688 jauEpv00(tt.djm0, tt.djm1, ehpv, ebpv);
25689
25690 /* Form the equinox based BPN matrix, IAU 2006/2000A. */
25691 r = jauPnm06a(tt.djm0, tt.djm1);
25692
25693 /* Extract CIP X,Y. */
25694 CelestialIntermediatePole cip = jauBpn2xy(r);
25695
25696 /* Obtain CIO locator s. */
25697 s = jauS06(tt.djm0, tt.djm1, cip.x, cip.y);
25698
25699 /* Earth rotation angle. */
25700 theta = jauEra00(ut1.djm0, ut1.djm1);
25701
25702 /* TIO locator s'. */
25703 sp = jauSp00(tt.djm0, tt.djm1);
25704
25705 /* Refraction constants A and B. */
25706 RefCos ref = jauRefco(phpa, tc, rh, wl);
25707
25708 /* Compute the star-independent astrometry parameters. */
25709 jauApco(tt.djm0, tt.djm1, ebpv, ehpv[0], cip.x, cip.y, s, theta,
25710 elong, phi, hm, xp, yp, sp, ref.a, ref.b, astrom);
25711
25712 /* Equation of the origins. */
25713 eo = jauEors(r, s);
25714
25715 return eo;
25716
25717 /* Finished. */
25718
25719
25720 }
25721
25722 /**
25723 * For an observer whose geocentric position and velocity are known,
25724 * prepare star-independent astrometry parameters for transformations
25725 * between ICRS and GCRS. The Earth ephemeris is supplied by the
25726 * caller.
25727 *
25728 * The parameters produced by this function are required in the space
25729 * motion, parallax, light deflection and aberration parts of the
25730 * astrometric transformation chain.
25731 *
25732 *<p>This function is derived from the International Astronomical Union's
25733 * SOFA (Standards of Fundamental Astronomy) software collection.
25734 *
25735 *<p>Status: support function.
25736 *
25737 *<!-- Given: -->
25738 * @param date1 double TDB as a 2-part...
25739 * @param date2 double ...Julian Date (Note 1)
25740 * @param pv double[2][3] observer's geocentric pos/vel (m, m/s)
25741 * @param ebpv double[2][3] Earth barycentric PV (au, au/day)
25742 * @param ehp double[3] Earth heliocentric P (au)
25743 *
25744 *<!-- Returned:-->
25745 * @param astrom <b>Returned</b> star-independent astrometry parameters:
25746
25747 *<p>Notes:
25748 * <ol>
25749 *
25750 * <li> The TDB date date1+date2 is a Julian Date, apportioned in any
25751 * convenient way between the two arguments. For example,
25752 * JD(TDB)=2450123.7 could be expressed in any of these ways, among
25753 * others:
25754 * <pre>
25755 * date1 date2
25756 *
25757 * 2450123.7 0.0 (JD method)
25758 * 2451545.0 -1421.3 (J2000 method)
25759 * 2400000.5 50123.2 (MJD method)
25760 * 2450123.5 0.2 (date & time method)
25761 * </pre>
25762 * <p>The JD method is the most natural and convenient to use in cases
25763 * where the loss of several decimal digits of resolution is
25764 * acceptable. The J2000 method is best matched to the way the
25765 * argument is handled internally and will deliver the optimum
25766 * resolution. The MJD method and the date & time methods are both
25767 * good compromises between resolution and convenience. For most
25768 * applications of this function the choice will not be at all
25769 * critical.
25770 *
25771 * <p>TT can be used instead of TDB without any significant impact on
25772 * accuracy.
25773 *
25774 * <li> All the vectors are with respect to BCRS axes.
25775 *
25776 * <li> Providing separate arguments for (i) the observer's geocentric
25777 * position and velocity and (ii) the Earth ephemeris is done for
25778 * convenience in the geocentric, terrestrial and Earth orbit cases.
25779 * For deep space applications it maybe more convenient to specify
25780 * zero geocentric position and velocity and to supply the
25781 * observer's position and velocity information directly instead of
25782 * with respect to the Earth. However, note the different units:
25783 * m and m/s for the geocentric vectors, au and au/day for the
25784 * heliocentric and barycentric vectors.
25785 *
25786 * <li> In cases where the caller does not wish to provide the Earth
25787 * ephemeris, the function iauApcs13 can be used instead of the
25788 * present function. This computes the Earth ephemeris using the
25789 * SOFA function iauEpv00.
25790 *
25791 * <li> This is one of several functions that inserts into the astrom
25792 * structure star-independent parameters needed for the chain of
25793 * astrometric transformations {@code ICRS <-> GCRS <-> CIRS <-> observed.}
25794 *
25795 * <p>The various functions support different classes of observer and
25796 * portions of the transformation chain:
25797 *
25798 * <pre>{@code
25799 * functions observer transformation
25800 *
25801 * iauApcg iauApcg13 geocentric ICRS <-> GCRS
25802 * iauApci iauApci13 terrestrial ICRS <-> CIRS
25803 * iauApco iauApco13 terrestrial ICRS <-> observed
25804 * iauApcs iauApcs13 space ICRS <-> GCRS
25805 * iauAper iauAper13 terrestrial update Earth rotation
25806 * iauApio iauApio13 terrestrial CIRS <-> observed
25807 * }</pre>
25808 * <p>Those with names ending in "13" use contemporary SOFA models to
25809 * compute the various ephemerides. The others accept ephemerides
25810 * supplied by the caller.
25811 *
25812 * <p>The transformation from ICRS to GCRS covers space motion,
25813 * parallax, light deflection, and aberration. From GCRS to CIRS
25814 * comprises frame bias and precession-nutation. From CIRS to
25815 * observed takes account of Earth rotation, polar motion, diurnal
25816 * aberration and parallax (unless subsumed into the {@code ICRS <-> GCRS}
25817 * transformation), and atmospheric refraction.
25818 *
25819 * <li> The context structure astrom produced by this function is used by
25820 * iauAtciq* and iauAticq*.
25821 *
25822 * </ol>
25823 * Called:
25824 * <ul>
25825 * <li>{@link #jauCp} copy p-vector
25826 * <li>{@link #jauPm} modulus of p-vector
25827 * <li>{@link #jauPn} decompose p-vector into modulus and direction
25828 * <li>{@link #jauIr} initialize r-matrix to identity
25829 *
25830 * </ul>
25831 *@version 2013 October 9
25832 *
25833 *@since JSOFA release 20131202
25834 *
25835 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
25836 */
25837 public static void jauApcs(double date1, double date2, double pv[][],
25838 double ebpv[][], double ehp[],
25839 Astrom astrom)
25840 {
25841 /* au/d to m/s */
25842 final double AUDMS = DAU/DAYSEC;
25843
25844 /* Light time for 1 au (day) */
25845 final double CR = AULT/DAYSEC;
25846
25847 int i;
25848 double dp, dv, pb[] = new double[3], vb[] = new double[3], ph[] = new double[3], v2, w;
25849
25850
25851 /* Time since reference epoch, years (for proper motion calculation). */
25852 astrom.pmt = ( (date1 - DJ00) + date2 ) / DJY;
25853
25854 /* Adjust Earth ephemeris to observer. */
25855 for (i = 0; i < 3; i++) {
25856 dp = pv[0][i] / DAU;
25857 dv = pv[1][i] / AUDMS;
25858 pb[i] = ebpv[0][i] + dp;
25859 vb[i] = ebpv[1][i] + dv;
25860 ph[i] = ehp[i] + dp;
25861 }
25862
25863 /* Barycentric position of observer (au). */
25864 jauCp(pb, astrom.eb);
25865
25866 /* Heliocentric direction and distance (unit vector and au). */
25867 NormalizedVector nv = jauPn(ph);
25868
25869 astrom.em = nv.r;
25870 astrom.eh = nv.u;
25871
25872 /* Barycentric vel. in units of c, and reciprocal of Lorenz factor. */
25873 v2 = 0.0;
25874 for (i = 0; i < 3; i++) {
25875 w = vb[i] * CR;
25876 astrom.v[i] = w;
25877 v2 += w*w;
25878 }
25879 astrom.bm1 = sqrt(1.0 - v2);
25880
25881 /* Reset the NPB matrix. */
25882 jauIr(astrom.bpn);
25883
25884 /* Finished. */
25885
25886
25887 }
25888
25889 /**
25890 * For an observer whose geocentric position and velocity are known,
25891 * prepare star-independent astrometry parameters for transformations
25892 * between ICRS and GCRS. The Earth ephemeris is from SOFA models.
25893 *
25894 * The parameters produced by this function are required in the space
25895 * motion, parallax, light deflection and aberration parts of the
25896 * astrometric transformation chain.
25897 *
25898 *<p>This function is derived from the International Astronomical Union's
25899 * SOFA (Standards of Fundamental Astronomy) software collection.
25900 *
25901 *<p>Status: support function.
25902 *
25903 *<!-- Given: -->
25904 * @param date1 double TDB as a 2-part...
25905 * @param date2 double ...Julian Date (Note 1)
25906 * @param pv double[2][3] observer's geocentric pos/vel (Note 3)
25907 *
25908 *<!-- Returned:-->
25909 * @param astrom <b>Returned</b> star-independent astrometry parameters:
25910 *
25911 *<p>Notes:
25912 * <ol>
25913 *
25914 * <li> The TDB date date1+date2 is a Julian Date, apportioned in any
25915 * convenient way between the two arguments. For example,
25916 * JD(TDB)=2450123.7 could be expressed in any of these ways, among
25917 * others:
25918 * <pre>
25919 * date1 date2
25920 *
25921 * 2450123.7 0.0 (JD method)
25922 * 2451545.0 -1421.3 (J2000 method)
25923 * 2400000.5 50123.2 (MJD method)
25924 * 2450123.5 0.2 (date & time method)
25925 * </pre>
25926 * <p>The JD method is the most natural and convenient to use in cases
25927 * where the loss of several decimal digits of resolution is
25928 * acceptable. The J2000 method is best matched to the way the
25929 * argument is handled internally and will deliver the optimum
25930 * resolution. The MJD method and the date & time methods are both
25931 * good compromises between resolution and convenience. For most
25932 * applications of this function the choice will not be at all
25933 * critical.
25934 *
25935 * <p>TT can be used instead of TDB without any significant impact on
25936 * accuracy.
25937 *
25938 * <li> All the vectors are with respect to BCRS axes.
25939 *
25940 * <li> The observer's position and velocity pv are geocentric but with
25941 * respect to BCRS axes, and in units of m and m/s. No assumptions
25942 * are made about proximity to the Earth, and the function can be
25943 * used for deep space applications as well as Earth orbit and
25944 * terrestrial.
25945 *
25946 * <li> In cases where the caller wishes to supply his own Earth
25947 * ephemeris, the function iauApcs can be used instead of the present
25948 * function.
25949 *
25950 * <li> This is one of several functions that inserts into the astrom
25951 * structure star-independent parameters needed for the chain of
25952 * astrometric transformations {@code ICRS <-> GCRS <-> CIRS <-> observed.}
25953 *
25954 * <p>The various functions support different classes of observer and
25955 * portions of the transformation chain:
25956 * <pre>{@code
25957 * functions observer transformation
25958 *
25959 * iauApcg iauApcg13 geocentric ICRS <-> GCRS
25960 * iauApci iauApci13 terrestrial ICRS <-> CIRS
25961 * iauApco iauApco13 terrestrial ICRS <-> observed
25962 * iauApcs iauApcs13 space ICRS <-> GCRS
25963 * iauAper iauAper13 terrestrial update Earth rotation
25964 * iauApio iauApio13 terrestrial CIRS <-> observed
25965 * }</pre>
25966 * <p>Those with names ending in "13" use contemporary SOFA models to
25967 * compute the various ephemerides. The others accept ephemerides
25968 * supplied by the caller.
25969 *
25970 * <p>The transformation from ICRS to GCRS covers space motion,
25971 * parallax, light deflection, and aberration. From GCRS to CIRS
25972 * comprises frame bias and precession-nutation. From CIRS to
25973 * observed takes account of Earth rotation, polar motion, diurnal
25974 * aberration and parallax (unless subsumed into the {@code ICRS <-> GCRS}
25975 * transformation), and atmospheric refraction.
25976 *
25977 * <li> The context structure astrom produced by this function is used by
25978 * iauAtciq* and iauAticq*.
25979 *
25980 * </ol>
25981 * Called:
25982 * <ul>
25983 * <li>{@link #jauEpv00} Earth position and velocity
25984 * <li>{@link #jauApcs} astrometry parameters, ICRS-GCRS, space observer
25985 *
25986 * </ul>
25987 *@version 2013 October 9
25988 *
25989 *@since JSOFA release 20131202
25990 *
25991 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
25992 */
25993 public static void jauApcs13(double date1, double date2, double pv[][],
25994 Astrom astrom)
25995 {
25996 double ehpv[][] = new double[2][3], ebpv[][] = new double[2][3];
25997
25998
25999 /* Earth barycentric & heliocentric position/velocity (au, au/d). */
26000 jauEpv00(date1, date2, ehpv, ebpv);
26001
26002 /* Compute the star-independent astrometry parameters. */
26003 jauApcs(date1, date2, pv, ebpv, ehpv[0], astrom);
26004
26005 /* Finished. */
26006
26007
26008 }
26009
26010 /**
26011 * In the star-independent astrometry parameters, update only the
26012 * Earth rotation angle, supplied by the caller explicitly.
26013 *
26014 *<p>This function is derived from the International Astronomical Union's
26015 * SOFA (Standards of Fundamental Astronomy) software collection.
26016 *
26017 *<p>Status: support function.
26018 *
26019 *<!-- Given: -->
26020 * @param theta double Earth rotation angle (radians, Note 2)
26021 * @param astrom Astrom star-independent astrometry parameters:{@code
26022 * pmt double not used
26023 * eb double[3] not used
26024 * eh double[3] not used
26025 * em double not used
26026 * v double[3] not used
26027 * bm1 double not used
26028 * bpn double[3][3] not used
26029 * along double longitude + s' (radians)
26030 * xpl double not used
26031 * ypl double not used
26032 * sphi double not used
26033 * cphi double not used
26034 * diurab double not used
26035 * eral double not used
26036 * refa double not used
26037 * refb double not used}
26038 *
26039 *<!-- Returned:-->
26040 * astrom <b>Returned</b> star-independent astrometry parameters:
26041 *
26042 *<p>Notes:
26043 * <ol>
26044 *
26045 * <li> This function exists to enable sidereal-tracking applications to
26046 * avoid wasteful recomputation of the bulk of the astrometry
26047 * parameters: only the Earth rotation is updated.
26048 *
26049 * <li> For targets expressed as equinox based positions, such as
26050 * classical geocentric apparent (RA,Dec), the supplied theta can be
26051 * Greenwich apparent sidereal time rather than Earth rotation
26052 * angle.
26053 *
26054 * <li> The function iauAper13 can be used instead of the present
26055 * function, and starts from UT1 rather than ERA itself.
26056 *
26057 * <li> This is one of several functions that inserts into the astrom
26058 * structure star-independent parameters needed for the chain of
26059 * astrometric transformations {@code ICRS <-> GCRS <-> CIRS <-> observed.}
26060 *
26061 * <p>The various functions support different classes of observer and
26062 * portions of the transformation chain:
26063 * <pre>{@code
26064 * functions observer transformation
26065 *
26066 * iauApcg iauApcg13 geocentric ICRS <-> GCRS
26067 * iauApci iauApci13 terrestrial ICRS <-> CIRS
26068 * iauApco iauApco13 terrestrial ICRS <-> observed
26069 * iauApcs iauApcs13 space ICRS <-> GCRS
26070 * iauAper iauAper13 terrestrial update Earth rotation
26071 * iauApio iauApio13 terrestrial CIRS <-> observed
26072 * }</pre>
26073 * <p>Those with names ending in "13" use contemporary SOFA models to
26074 * compute the various ephemerides. The others accept ephemerides
26075 * supplied by the caller.
26076 *
26077 * <p>The transformation from ICRS to GCRS covers space motion,
26078 * parallax, light deflection, and aberration. From GCRS to CIRS
26079 * comprises frame bias and precession-nutation. From CIRS to
26080 * observed takes account of Earth rotation, polar motion, diurnal
26081 * aberration and parallax (unless subsumed into the {@code ICRS <-> GCRS}
26082 * transformation), and atmospheric refraction.
26083 *
26084 * </ol>
26085 *@version 2013 September 25
26086 *
26087 *@since JSOFA release 20131202
26088 *
26089 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
26090 */
26091 public static void jauAper(double theta, Astrom astrom)
26092 {
26093 astrom.eral = theta + astrom.along;
26094
26095 /* Finished. */
26096
26097
26098 }
26099
26100 /**
26101 * In the star-independent astrometry parameters, update only the
26102 * Earth rotation angle. The caller provides UT1, (n.b. not UTC).
26103 *
26104 *<p>This function is derived from the International Astronomical Union's
26105 * SOFA (Standards of Fundamental Astronomy) software collection.
26106 *
26107 *<p>Status: support function.
26108 *
26109 *<!-- Given: -->
26110 * @param ut11 double UT1 as a 2-part...
26111 * @param ut12 double ...Julian Date (Note 1)
26112 * @param astrom star-independent astrometry parameters:
26113 * pmt double not used
26114 * eb double[3] not used
26115 * eh double[3] not used
26116 * em double not used
26117 * v double[3] not used
26118 * bm1 double not used
26119 * bpn double[3][3] not used
26120 * along double longitude + s' (radians)
26121 * xpl double not used
26122 * ypl double not used
26123 * sphi double not used
26124 * cphi double not used
26125 * diurab double not used
26126 * eral double not used
26127 * refa double not used
26128 * refb double not used
26129 *
26130 *<!-- Returned:-->
26131 * @param astrom <b>Returned</b> star-independent astrometry parameters:
26132 *
26133 *<p>Notes:
26134 * <ol>
26135 *
26136 * <li> The UT1 date (n.b. not UTC) ut11+ut12 is a Julian Date,
26137 * apportioned in any convenient way between the arguments ut11 and
26138 * ut12. For example, JD(UT1)=2450123.7 could be expressed in any
26139 * of these ways, among others:
26140 *
26141 * <p>ut11 ut12
26142 *
26143 * 2450123.7 0.0 (JD method)
26144 * 2451545.0 -1421.3 (J2000 method)
26145 * 2400000.5 50123.2 (MJD method)
26146 * 2450123.5 0.2 (date & time method)
26147 *
26148 * <p>The JD method is the most natural and convenient to use in cases
26149 * where the loss of several decimal digits of resolution is
26150 * acceptable. The J2000 and MJD methods are good compromises
26151 * between resolution and convenience. The date & time method is
26152 * best matched to the algorithm used: maximum precision is
26153 * delivered when the ut11 argument is for 0hrs UT1 on the day in
26154 * question and the ut12 argument lies in the range 0 to 1, or vice
26155 * versa.
26156 *
26157 * <li> If the caller wishes to provide the Earth rotation angle itself,
26158 * the function iauAper can be used instead. One use of this
26159 * technique is to substitute Greenwich apparent sidereal time and
26160 * thereby to support equinox based transformations directly.
26161 *
26162 * <li> This is one of several functions that inserts into the astrom
26163 * structure star-independent parameters needed for the chain of
26164 * astrometric transformations {@code ICRS <-> GCRS <-> CIRS <-> observed.}
26165 *
26166 * <p>The various functions support different classes of observer and
26167 * portions of the transformation chain:
26168 * <pre>{@code
26169 * functions observer transformation
26170 *
26171 * <p>iauApcg iauApcg13 geocentric ICRS <-> GCRS
26172 * iauApci iauApci13 terrestrial ICRS <-> CIRS
26173 * iauApco iauApco13 terrestrial ICRS <-> observed
26174 * iauApcs iauApcs13 space ICRS <-> GCRS
26175 * iauAper iauAper13 terrestrial update Earth rotation
26176 * iauApio iauApio13 terrestrial CIRS <-> observed
26177 * }</pre>
26178 * <p>Those with names ending in "13" use contemporary SOFA models to
26179 * compute the various ephemerides. The others accept ephemerides
26180 * supplied by the caller.
26181 *
26182 * <p>The transformation from ICRS to GCRS covers space motion,
26183 * parallax, light deflection, and aberration. From GCRS to CIRS
26184 * comprises frame bias and precession-nutation. From CIRS to
26185 * observed takes account of Earth rotation, polar motion, diurnal
26186 * aberration and parallax (unless subsumed into the {@code ICRS <-> GCRS}
26187 * transformation), and atmospheric refraction.
26188 *
26189 * </ol>
26190 * Called:
26191 * <ul>
26192 * <li>{@link #jauAper} astrometry parameters: update ERA
26193 * <li>{@link #jauEra00} Earth rotation angle, IAU 2000
26194 *
26195 * </ul>
26196 *@version 2013 September 25
26197 *
26198 *@since JSOFA release 20131202
26199 *
26200 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
26201 */
26202 public static void jauAper13(double ut11, double ut12, Astrom astrom)
26203 {
26204 jauAper(jauEra00(ut11,ut12), astrom);
26205
26206 /* Finished. */
26207
26208
26209 }
26210
26211 /**
26212 * For a terrestrial observer, prepare star-independent astrometry
26213 * parameters for transformations between CIRS and observed
26214 * coordinates. The caller supplies the Earth orientation information
26215 * and the refraction constants as well as the site coordinates.
26216 *
26217 *<p>This function is derived from the International Astronomical Union's
26218 * SOFA (Standards of Fundamental Astronomy) software collection.
26219 *
26220 *<p>Status: support function.
26221 *
26222 *<!-- Given: -->
26223 * @param sp double the TIO locator s' (radians, Note 1)
26224 * @param theta double Earth rotation angle (radians)
26225 * @param elong double longitude (radians, east +ve, Note 2)
26226 * @param phi double geodetic latitude (radians, Note 2)
26227 * @param hm double height above ellipsoid (m, geodetic Note 2)
26228 * @param xp double polar motion coordinates (radians, Note 3)
26229 * @param yp double polar motion coordinates (radians, Note 3)
26230 * @param refa double refraction constant A (radians, Note 4)
26231 * @param refb double refraction constant B (radians, Note 4)
26232 *
26233 *<!-- Returned:-->
26234 * @param astrom {@link Astrom} <b>Returned</b> star-independent astrometry parameters:
26235 *
26236 *<p>Notes:
26237 * <ol>
26238 *
26239 * <li> sp, the TIO locator s', is a tiny quantity needed only by the
26240 * most precise applications. It can either be set to zero or
26241 * predicted using the SOFA function iauSp00.
26242 *
26243 * <li> The geographical coordinates are with respect to the WGS84
26244 * reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN: the
26245 * longitude required by the present function is east-positive
26246 * (i.e. right-handed), in accordance with geographical convention.
26247 *
26248 * <li> The polar motion xp,yp can be obtained from IERS bulletins. The
26249 * values are the coordinates (in radians) of the Celestial
26250 * Intermediate Pole with respect to the International Terrestrial
26251 * Reference System (see IERS Conventions 2003), measured along the
26252 * meridians 0 and 90 deg west respectively. For many applications,
26253 * xp and yp can be set to zero.
26254 *
26255 * <p>Internally, the polar motion is stored in a form rotated onto the
26256 * local meridian.
26257 *
26258 * <li> The refraction constants refa and refb are for use in a
26259 * dZ = A*tan(Z)+B*tan^3(Z) model, where Z is the observed
26260 * (i.e. refracted) zenith distance and dZ is the amount of
26261 * refraction.
26262 *
26263 * <li> It is advisable to take great care with units, as even unlikely
26264 * values of the input parameters are accepted and processed in
26265 * accordance with the models used.
26266 *
26267 * <li> In cases where the caller does not wish to provide the Earth
26268 * rotation information and refraction constants, the function
26269 * iauApio13 can be used instead of the present function. This
26270 * starts from UTC and weather readings etc. and computes suitable
26271 * values using other SOFA functions.
26272 *
26273 * <li> This is one of several functions that inserts into the astrom
26274 * structure star-independent parameters needed for the chain of
26275 * astrometric transformations {@code ICRS <-> GCRS <-> CIRS <-> observed.}
26276 *
26277 * <p>The various functions support different classes of observer and
26278 * portions of the transformation chain:
26279 *<pre>{@code
26280 * functions observer transformation
26281 *
26282 * iauApcg iauApcg13 geocentric ICRS <-> GCRS
26283 * iauApci iauApci13 terrestrial ICRS <-> CIRS
26284 * iauApco iauApco13 terrestrial ICRS <-> observed
26285 * iauApcs iauApcs13 space ICRS <-> GCRS
26286 * iauAper iauAper13 terrestrial update Earth rotation
26287 * iauApio iauApio13 terrestrial CIRS <-> observed
26288 *}</pre>
26289 * <p>Those with names ending in "13" use contemporary SOFA models to
26290 * compute the various ephemerides. The others accept ephemerides
26291 * supplied by the caller.
26292 *
26293 * <p>The transformation from ICRS to GCRS covers space motion,
26294 * parallax, light deflection, and aberration. From GCRS to CIRS
26295 * comprises frame bias and precession-nutation. From CIRS to
26296 * observed takes account of Earth rotation, polar motion, diurnal
26297 * aberration and parallax (unless subsumed into the {@code ICRS <-> GCRS}
26298 * transformation), and atmospheric refraction.
26299 *
26300 * <li> The context structure astrom produced by this function is used by
26301 * iauAtioq and iauAtoiq.
26302 *
26303 * </ol>
26304 * Called:
26305 * <ul>
26306 * <li>{@link #jauPvtob} position/velocity of terrestrial station
26307 * <li>{@link #jauAper} astrometry parameters: update ERA
26308 *
26309 * </ul>
26310 *@version 2013 October 9
26311 *
26312 *@since JSOFA release 20131202
26313 *
26314 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
26315 * @throws JSOFAInternalError an internal error has occured
26316 * @throws JSOFAIllegalParameter
26317 */
26318 public static void jauApio(double sp, double theta,
26319 double elong, double phi, double hm, double xp, double yp,
26320 double refa, double refb,
26321 Astrom astrom) throws JSOFAIllegalParameter, JSOFAInternalError
26322 {
26323 double sl, cl, pv[][];
26324
26325
26326 /* Longitude with adjustment for TIO locator s'. */
26327 astrom.along = elong + sp;
26328
26329 /* Polar motion, rotated onto the local meridian. */
26330 sl = sin(astrom.along);
26331 cl = cos(astrom.along);
26332 astrom.xpl = xp*cl - yp*sl;
26333 astrom.ypl = xp*sl + yp*cl;
26334
26335 /* Functions of latitude. */
26336 astrom.sphi = sin(phi);
26337 astrom.cphi = cos(phi);
26338
26339 /* Observer's geocentric position and velocity (m, m/s, CIRS). */
26340 pv = jauPvtob(elong, phi, hm, xp, yp, sp, theta);
26341
26342 /* Magnitude of diurnal aberration vector. */
26343 astrom.diurab = sqrt(pv[1][0]*pv[1][0]+pv[1][1]*pv[1][1]) / CMPS;
26344
26345 /* Refraction constants. */
26346 astrom.refa = refa;
26347 astrom.refb = refb;
26348
26349 /* Local Earth rotation angle. */
26350 jauAper(theta, astrom);
26351
26352 /* Finished. */
26353
26354
26355 }
26356
26357 /**
26358 * For a terrestrial observer, prepare star-independent astrometry
26359 * parameters for transformations between CIRS and observed
26360 * coordinates. The caller supplies UTC, site coordinates, ambient air
26361 * conditions and observing wavelength.
26362 *
26363 *<p>This function is derived from the International Astronomical Union's
26364 * SOFA (Standards of Fundamental Astronomy) software collection.
26365 *
26366 *<p>Status: support function.
26367 *
26368 *<!-- Given: -->
26369 * @param utc1 double UTC as a 2-part...
26370 * @param utc2 double ...quasi Julian Date (Notes 1,2)
26371 * @param dut1 double UT1-UTC (seconds)
26372 * @param elong double longitude (radians, east +ve, Note 3)
26373 * @param phi double geodetic latitude (radians, Note 3)
26374 * @param hm double height above ellipsoid (m, geodetic Notes 4,6)
26375 * @param xp double polar motion coordinates (radians, Note 5)
26376 * @param yp double polar motion coordinates (radians, Note 5)
26377 * @param phpa double pressure at the observer (hPa = mB, Note 6)
26378 * @param tc double ambient temperature at the observer (deg C)
26379 * @param rh double relative humidity at the observer (range 0-1)
26380 * @param wl double wavelength (micrometers, Note 7)
26381 *
26382 *<!-- Returned:-->
26383 * @param astrom <b>Returned</b> star-independent astrometry parameters:
26384 * @throws JSOFAInternalError an internal error has occured
26385 * @throws JSOFAIllegalParameter int status: <b>Returned</b> +1 = dubious year (Note 2)
26386 * 0 = <b>Returned</b> OK
26387 * -1 = <b>Returned</b> unacceptable date
26388 *
26389 *<p>Notes:
26390 * <ol>
26391 *
26392 * <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
26393 * convenient way between the two arguments, for example where utc1
26394 * is the Julian Day Number and utc2 is the fraction of a day.
26395 *
26396 * <p>However, JD cannot unambiguously represent UTC during a leap
26397 * second unless special measures are taken. The convention in the
26398 * present function is that the JD day represents UTC days whether
26399 * the length is 86399, 86400 or 86401 SI seconds.
26400 *
26401 * <p>Applications should use the function iauDtf2d to convert from
26402 * calendar date and time of day into 2-part quasi Julian Date, as
26403 * it implements the leap-second-ambiguity convention just
26404 * described.
26405 *
26406 * <li> The warning status "dubious year" flags UTCs that predate the
26407 * introduction of the time scale or that are too far in the future
26408 * to be trusted. See iauDat for further details.
26409 *
26410 * <li> UT1-UTC is tabulated in IERS bulletins. It increases by exactly
26411 * one second at the end of each positive UTC leap second,
26412 * introduced in order to keep UT1-UTC within +/- 0.9s. n.b. This
26413 * practice is under review, and in the future UT1-UTC may grow
26414 * essentially without limit.
26415 *
26416 * <li> The geographical coordinates are with respect to the WGS84
26417 * reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN: the
26418 * longitude required by the present function is east-positive
26419 * (i.e. right-handed), in accordance with geographical convention.
26420 *
26421 * <li> The polar motion xp,yp can be obtained from IERS bulletins. The
26422 * values are the coordinates (in radians) of the Celestial
26423 * Intermediate Pole with respect to the International Terrestrial
26424 * Reference System (see IERS Conventions 2003), measured along the
26425 * meridians 0 and 90 deg west respectively. For many applications,
26426 * xp and yp can be set to zero.
26427 *
26428 * <p>Internally, the polar motion is stored in a form rotated onto
26429 * the local meridian.
26430 *
26431 * <li> If hm, the height above the ellipsoid of the observing station
26432 * in meters, is not known but phpa, the pressure in hPa (=mB), is
26433 * available, an adequate estimate of hm can be obtained from the
26434 * expression
26435 *
26436 * <p>hm = -29.3 * tsl * log ( phpa / 1013.25 );
26437 *
26438 * <p>where tsl is the approximate sea-level air temperature in K
26439 * (See Astrophysical Quantities, C.W.Allen, 3rd edition, section
26440 * 52). Similarly, if the pressure phpa is not known, it can be
26441 * estimated from the height of the observing station, hm, as
26442 * follows:
26443 *
26444 * <p>phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) );
26445 *
26446 * <p>Note, however, that the refraction is nearly proportional to the
26447 * pressure and that an accurate phpa value is important for
26448 * precise work.
26449 *
26450 * <li> The argument wl specifies the observing wavelength in
26451 * micrometers. The transition from optical to radio is assumed to
26452 * occur at 100 micrometers (about 3000 GHz).
26453 *
26454 * <li> It is advisable to take great care with units, as even unlikely
26455 * values of the input parameters are accepted and processed in
26456 * accordance with the models used.
26457 *
26458 * <li> In cases where the caller wishes to supply his own Earth
26459 * rotation information and refraction constants, the function
26460 * iauApc can be used instead of the present function.
26461 *
26462 * <li> This is one of several functions that inserts into the astrom
26463 * structure star-independent parameters needed for the chain of
26464 * astrometric transformations {@code ICRS <-> GCRS <-> CIRS <-> observed.}
26465 *
26466 * <p>The various functions support different classes of observer and
26467 * portions of the transformation chain:
26468 * <pre>{@code
26469 * functions observer transformation
26470 *
26471 * iauApcg iauApcg13 geocentric ICRS <-> GCRS
26472 * iauApci iauApci13 terrestrial ICRS <-> CIRS
26473 * iauApco iauApco13 terrestrial ICRS <-> observed
26474 * iauApcs iauApcs13 space ICRS <-> GCRS
26475 * iauAper iauAper13 terrestrial update Earth rotation
26476 * iauApio iauApio13 terrestrial CIRS <-> observed
26477 * }</pre>
26478 * <p>Those with names ending in "13" use contemporary SOFA models to
26479 * compute the various ephemerides. The others accept ephemerides
26480 * supplied by the caller.
26481 *
26482 * <p>The transformation from ICRS to GCRS covers space motion,
26483 * parallax, light deflection, and aberration. From GCRS to CIRS
26484 * comprises frame bias and precession-nutation. From CIRS to
26485 * observed takes account of Earth rotation, polar motion, diurnal
26486 * aberration and parallax (unless subsumed into the {@code ICRS <-> GCRS}
26487 * transformation), and atmospheric refraction.
26488 *
26489 * <li> The context structure astrom produced by this function is used
26490 * by iauAtioq and iauAtoiq.
26491 *
26492 * </ol>
26493 * Called:
26494 * <ul>
26495 * <li>{@link #jauUtctai} UTC to TAI
26496 * <li>{@link #jauTaitt} TAI to TT
26497 * <li>{@link #jauUtcut1} UTC to UT1
26498 * <li>{@link #jauSp00} the TIO locator s', IERS 2000
26499 * <li>{@link #jauEra00} Earth rotation angle, IAU 2000
26500 * <li>{@link #jauRefco} refraction constants for given ambient conditions
26501 * <li>{@link #jauApio} astrometry parameters, CIRS-observed
26502 *
26503 * </ul>
26504 *@version 2013 October 9
26505 *
26506 *@since JSOFA release 20131202
26507 *
26508 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
26509 * @throws JSOFAInternalError an internal error has occured
26510 * @throws JSOFAIllegalParameter
26511 */
26512 public static void jauApio13(double utc1, double utc2, double dut1,
26513 double elong, double phi, double hm, double xp, double yp,
26514 double phpa, double tc, double rh, double wl,
26515 Astrom astrom) throws JSOFAIllegalParameter, JSOFAInternalError
26516 {
26517 double sp, theta;
26518
26519
26520 /* UTC to other time scales. */
26521 JulianDate tai = jauUtctai(utc1, utc2);
26522 JulianDate tt = jauTaitt(tai.djm0, tai.djm1);
26523 JulianDate ut1 = jauUtcut1(utc1, utc2, dut1);
26524
26525 /* TIO locator s'. */
26526 sp = jauSp00(tt.djm0, tt.djm1);
26527
26528 /* Earth rotation angle. */
26529 theta = jauEra00(ut1.djm0, ut1.djm1);
26530
26531 /* Refraction constants A and B. */
26532 RefCos refco = jauRefco(phpa, tc, rh, wl);
26533
26534 /* CIRS <-> observed astrometry parameters. */
26535 jauApio(sp, theta, elong, phi, hm, xp, yp, refco.a, refco.b, astrom);
26536
26537
26538 /* Finished. */
26539
26540
26541 }
26542
26543 /**
26544 * Transform ICRS star data, epoch J2000.0, to CIRS.
26545 *
26546 *<p>This function is derived from the International Astronomical Union's
26547 * SOFA (Standards of Fundamental Astronomy) software collection.
26548 *
26549 *<p>Status: support function.
26550 *
26551 *<!-- Given: -->
26552 * @param rc double ICRS right ascension at J2000.0 (radians, Note 1)
26553 * @param dc double ICRS declination at J2000.0 (radians, Note 1)
26554 * @param pr double RA proper motion (radians/year; Note 2)
26555 * @param pd double Dec proper motion (radians/year)
26556 * @param px double parallax (arcsec)
26557 * @param rv double radial velocity (km/s, +ve if receding)
26558 * @param date1 double TDB as a 2-part...
26559 * @param date2 double ...Julian Date (Note 3)
26560 *
26561 *<!-- Returned:-->
26562 * @return double* <b>Returned</b> CIRS geocentric RA,Dec (radians)
26563 * eo double* <b>Returned</b> equation of the origins (ERA-GST, Note 5)
26564 *
26565 *<p>Notes:
26566 * <ol>
26567 *
26568 * <li> Star data for an epoch other than J2000.0 (for example from the
26569 * Hipparcos catalog, which has an epoch of J1991.25) will require a
26570 * preliminary call to iauPmsafe before use.
26571 *
26572 * <li> The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
26573 *
26574 * <li> The TDB date date1+date2 is a Julian Date, apportioned in any
26575 * convenient way between the two arguments. For example,
26576 * JD(TDB)=2450123.8g could be expressed in any of these ways, among
26577 * others:
26578 *
26579 * date1 date2
26580 *
26581 * 2450123.8g 0.0 (JD method)
26582 * 2451545.0 -1421.3 (J2000 method)
26583 * 2400000.5 50123.2 (MJD method)
26584 * 2450123.5 0.2 (date & time method)
26585 *
26586 * <p>The JD method is the most natural and convenient to use in cases
26587 * where the loss of several decimal digits of resolution is
26588 * acceptable. The J2000 method is best matched to the way the
26589 * argument is handled internally and will deliver the optimum
26590 * resolution. The MJD method and the date & time methods are both
26591 * good compromises between resolution and convenience. For most
26592 * applications of this function the choice will not be at all
26593 * critical.
26594 *
26595 * <p>TT can be used instead of TDB without any significant impact on
26596 * accuracy.
26597 *
26598 * <li> The available accuracy is better than 1 milliarcsecond, limited
26599 * mainly by the precession-nutation model that is used, namely
26600 * IAU 2000A/2006. Very close to solar system bodies, additional
26601 * errors of up to several milliarcseconds can occur because of
26602 * unmodeled light deflection; however, the Sun's contribution is
26603 * taken into account, to first order. The accuracy limitations of
26604 * the SOFA function iauEpv00 (used to compute Earth position and
26605 * velocity) can contribute aberration errors of up to
26606 * 5 microarcseconds. Light deflection at the Sun's limb is
26607 * uncertain at the 0.4 mas level.
26608 *
26609 * <li> Should the transformation to (equinox based) apparent place be
26610 * required rather than (CIO based) intermediate place, subtract the
26611 * equation of the origins from the returned right ascension:
26612 * RA = RI - EO. (The iauAnp function can then be applied, as
26613 * required, to keep the result in the conventional 0-2pi range.)
26614 *
26615 * </ol>
26616 * Called:
26617 * <ul>
26618 * <li>{@link #jauApci13} astrometry parameters, ICRS-CIRS, 2013
26619 * <li>{@link #jauAtciq} quick ICRS to CIRS
26620 *
26621 * </ul>
26622 *@version 2013 October 9
26623 *
26624 *@since JSOFA release 20131202
26625 *
26626 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
26627 */
26628 public static SphericalCoordinateEO jauAtci13(double rc, double dc,
26629 double pr, double pd, double px, double rv,
26630 double date1, double date2)
26631 {
26632 /* Star-independent astrometry parameters */
26633 Astrom astrom = new Astrom();
26634
26635
26636 /* The transformation parameters. */
26637 double eo = jauApci13(date1, date2, astrom);
26638
26639 /* ICRS (epoch J2000.0) to CIRS. */
26640 SphericalCoordinate co = jauAtciq(rc, dc, pr, pd, px, rv, astrom);
26641
26642 return new SphericalCoordinateEO(co, eo);
26643 /* Finished. */
26644
26645
26646 }
26647
26648 /**
26649 * Quick ICRS, epoch J2000.0, to CIRS transformation, given precomputed
26650 * star-independent astrometry parameters.
26651 *
26652 * Use of this function is appropriate when efficiency is important and
26653 * where many star positions are to be transformed for one date. The
26654 * star-independent parameters can be obtained by calling one of the
26655 * functions iauApci[13], iauApcg[13], iauApco[13] or iauApcs[13].
26656 *
26657 * If the parallax and proper motions are zero the iauAtciqz function
26658 * can be used instead.
26659 *
26660 *<p>This function is derived from the International Astronomical Union's
26661 * SOFA (Standards of Fundamental Astronomy) software collection.
26662 *
26663 *<p>Status: support function.
26664 *
26665 *<!-- Given: -->
26666 * @param rc double ICRS RA,Dec at J2000.0 (radians)
26667 * @param dc double ICRS RA,Dec at J2000.0 (radians)
26668 * @param pr double RA proper motion (radians/year; Note 3)
26669 * @param pd double Dec proper motion (radians/year)
26670 * @param px double parallax (arcsec)
26671 * @param rv double radial velocity (km/s, +ve if receding)
26672 * @param astrom star-independent astrometry parameters:
26673 *
26674 *<!-- Returned:-->
26675 * @return double <b>Returned</b> CIRS RA,Dec (radians)
26676 *
26677 *<p>Notes:
26678 * <ol>
26679 *
26680 * <li> All the vectors are with respect to BCRS axes.
26681 *
26682 * <li> Star data for an epoch other than J2000.0 (for example from the
26683 * Hipparcos catalog, which has an epoch of J1991.25) will require a
26684 * preliminary call to iauPmsafe before use.
26685 *
26686 * <li> The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
26687 *
26688 * </ol>
26689 * Called:
26690 * <ul>
26691 * <li>{@link #jauPmpx} proper motion and parallax
26692 * <li>{@link #jauLdsun} light deflection by the Sun
26693 * <li>{@link #jauAb} stellar aberration
26694 * <li>{@link #jauRxp} product of r-matrix and pv-vector
26695 * <li>{@link #jauC2s} p-vector to spherical
26696 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
26697 *
26698 * </ul>
26699 *@version 2013 October 9
26700 *
26701 *@since JSOFA release 20131202
26702 *
26703 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
26704 */
26705 public static SphericalCoordinate jauAtciq(double rc, double dc,
26706 double pr, double pd, double px, double rv,
26707 Astrom astrom)
26708 {
26709 double pco[], pnat[], ppr[], pi[];
26710
26711
26712 /* Proper motion and parallax, giving BCRS coordinate direction. */
26713 pco = jauPmpx(rc, dc, pr, pd, px, rv, astrom.pmt, astrom.eb);
26714
26715 /* Light deflection by the Sun, giving BCRS natural direction. */
26716 pnat = jauLdsun(pco, astrom.eh, astrom.em);
26717
26718 /* Aberration, giving GCRS proper direction. */
26719 ppr = jauAb(pnat, astrom.v, astrom.em, astrom.bm1);
26720
26721 /* Bias-precession-nutation, giving CIRS proper direction. */
26722 pi = jauRxp(astrom.bpn, ppr);
26723
26724 /* CIRS RA,Dec. */
26725 SphericalCoordinate co = jauC2s(pi);
26726 co.alpha = jauAnp(co.alpha);
26727
26728 return co;
26729 /* Finished. */
26730
26731
26732 }
26733
26734 /**
26735 * Quick ICRS, epoch J2000.0, to CIRS transformation, given precomputed
26736 * star-independent astrometry parameters plus a list of light-
26737 * deflecting bodies.
26738 *
26739 * Use of this function is appropriate when efficiency is important and
26740 * where many star positions are to be transformed for one date. The
26741 * star-independent parameters can be obtained by calling one of the
26742 * functions iauApci[13], iauApcg[13], iauApco[13] or iauApcs[13].
26743 *
26744 *
26745 * If the only light-deflecting body to be taken into account is the
26746 * Sun, the iauAtciq function can be used instead. If in addition the
26747 * parallax and proper motions are zero, the iauAtciqz function can be
26748 * used.
26749 *
26750 *<p>This function is derived from the International Astronomical Union's
26751 * SOFA (Standards of Fundamental Astronomy) software collection.
26752 *
26753 *<p>Status: support function.
26754 *
26755 *<!-- Given: -->
26756 * @param rc double ICRS RA,Dec at J2000.0 (radians)
26757 * @param dc double ICRS RA,Dec at J2000.0 (radians)
26758 * @param pr double RA proper motion (radians/year; Note 3)
26759 * @param pd double Dec proper motion (radians/year)
26760 * @param px double parallax (arcsec)
26761 * @param rv double radial velocity (km/s, +ve if receding)
26762 * @param astrom star-independent astrometry parameters:
26763 * @param n int number of bodies (Note 3)
26764 * @param b jauLDBODY[n] data for each of the n bodies (Notes 3,4):
26765 *
26766 *<!-- Returned:-->
26767 * @return ri,di double <b>Returned</b> CIRS RA,Dec (radians)
26768 *
26769 *<p>Notes:
26770 * <ol>
26771 *
26772 * <li> Star data for an epoch other than J2000.0 (for example from the
26773 * Hipparcos catalog, which has an epoch of J1991.25) will require a
26774 * preliminary call to iauPmsafe before use.
26775 *
26776 * <li> The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
26777 *
26778 * <li> The struct b contains n entries, one for each body to be
26779 * considered. If n = 0, no gravitational light deflection will be
26780 * applied, not even for the Sun.
26781 *
26782 * <li> The struct b should include an entry for the Sun as well as for
26783 * any planet or other body to be taken into account. The entries
26784 * should be in the order in which the light passes the body.
26785 *
26786 * <li> In the entry in the b struct for body i, the mass parameter
26787 * b[i].bm can, as required, be adjusted in order to allow for such
26788 * effects as quadrupole field.
26789 *
26790 * <li> The deflection limiter parameter b[i].dl is phi^2/2, where phi is
26791 * the angular separation (in radians) between star and body at
26792 * which limiting is applied. As phi shrinks below the chosen
26793 * threshold, the deflection is artificially reduced, reaching zero
26794 * for phi = 0. Example values suitable for a terrestrial
26795 * observer, together with masses, are as follows:
26796 * <pre>
26797 * body i b[i].bm b[i].dl
26798 *
26799 * Sun 1.0 6e-6
26800 * Jupiter 0.00095435 3e-9
26801 * Saturn 0.00028574 3e-10
26802 * </pre>
26803 * <li> For efficiency, validation of the contents of the b array is
26804 * omitted. The supplied masses must be greater than zero, the
26805 * position and velocity vectors must be right, and the deflection
26806 * limiter greater than zero.
26807 *
26808 * </ol>
26809 * Called:
26810 * <ul>
26811 * <li>{@link #jauPmpx} proper motion and parallax
26812 * <li>{@link #jauLdn} light deflection by n bodies
26813 * <li>{@link #jauAb} stellar aberration
26814 * <li>{@link #jauRxp} product of r-matrix and pv-vector
26815 * <li>{@link #jauC2s} p-vector to spherical
26816 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
26817 *
26818 * </ul>
26819 *@version 2013 October 9
26820 *
26821 *@since JSOFA release 20131202
26822 *
26823 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
26824 */
26825 public static SphericalCoordinate jauAtciqn(double rc, double dc, double pr, double pd,
26826 double px, double rv, Astrom astrom,
26827 int n, Ldbody b[])
26828 {
26829 double pco[], pnat[], ppr[] = new double[3], pi[] = new double[3];
26830
26831
26832 /* Proper motion and parallax, giving BCRS coordinate direction. */
26833 pco = jauPmpx(rc, dc, pr, pd, px, rv, astrom.pmt, astrom.eb);
26834
26835 /* Light deflection, giving BCRS natural direction. */
26836 pnat = jauLdn(n, b, astrom.eb, pco);
26837
26838 /* Aberration, giving GCRS proper direction. */
26839 ppr = jauAb(pnat, astrom.v, astrom.em, astrom.bm1);
26840
26841 /* Bias-precession-nutation, giving CIRS proper direction. */
26842 pi = jauRxp(astrom.bpn, ppr);
26843
26844 /* CIRS RA,Dec. */
26845 SphericalCoordinate co = jauC2s(pi);
26846 co.alpha = jauAnp(co.alpha);
26847
26848 return co;
26849 /* Finished. */
26850
26851
26852 }
26853
26854 /**
26855 * Quick ICRS to CIRS transformation, given precomputed star-
26856 * independent astrometry parameters, and assuming zero parallax and
26857 * proper motion.
26858 *
26859 * Use of this function is appropriate when efficiency is important and
26860 * where many star positions are to be transformed for one date. The
26861 * star-independent parameters can be obtained by calling one of the
26862 * functions iauApci[13], iauApcg[13], iauApco[13] or iauApcs[13].
26863 *
26864 * The corresponding function for the case of non-zero parallax and
26865 * proper motion is iauAtciq.
26866 *
26867 *<p>This function is derived from the International Astronomical Union's
26868 * SOFA (Standards of Fundamental Astronomy) software collection.
26869 *
26870 *<p>Status: support function.
26871 *
26872 *<!-- Given: -->
26873 * @param rc double ICRS astrometric RA,Dec (radians)
26874 * @param dc double ICRS astrometric RA,Dec (radians)
26875 * @param astrom star-independent astrometry parameters:
26876 *
26877 *<!-- Returned:-->
26878 * @return ri,di double <b>Returned</b> CIRS RA,Dec (radians)
26879 *
26880 * Note:
26881 *
26882 * @return All the <b>Returned</b> vectors are with respect to BCRS axes.
26883 *
26884 *<p>References:
26885 * <ul>
26886 *
26887 * <li> Urban, S. & Seidelmann, P. K. (eds), Explanatory Supplement to
26888 * the Astronomical Almanac, 3rd ed., University Science Books
26889 * (2013).
26890 *
26891 * <li> Klioner, Sergei A., "A practical relativistic model for micro-
26892 * arcsecond astrometry in space", Astr. J. 125, 1580-1597 (2003).
26893 *
26894 * </ul>
26895 * Called:
26896 * <ul>
26897 * <li>{@link #jauS2c} spherical coordinates to unit vector
26898 * <li>{@link #jauLdsun} light deflection due to Sun
26899 * <li>{@link #jauAb} stellar aberration
26900 * <li>{@link #jauRxp} product of r-matrix and p-vector
26901 * <li>{@link #jauC2s} p-vector to spherical
26902 * <li>{@link #jauAnp} normalize angle into range +/- pi
26903 *
26904 * </ul>
26905 *@version 2013 October 9
26906 *
26907 *@since JSOFA release 20131202
26908 *
26909 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
26910 */
26911 public static SphericalCoordinate jauAtciqz(double rc, double dc, Astrom astrom)
26912 {
26913 double pco[], pnat[], ppr[] = new double[3], pi[];
26914
26915
26916 /* BCRS coordinate direction (unit vector). */
26917 pco = jauS2c(rc, dc);
26918
26919 /* Light deflection by the Sun, giving BCRS natural direction. */
26920 pnat = jauLdsun(pco, astrom.eh, astrom.em);
26921
26922 /* Aberration, giving GCRS proper direction. */
26923 ppr = jauAb(pnat, astrom.v, astrom.em, astrom.bm1);
26924
26925 /* Bias-precession-nutation, giving CIRS proper direction. */
26926 pi = jauRxp(astrom.bpn, ppr);
26927
26928 /* CIRS RA,Dec. */
26929 SphericalCoordinate co = jauC2s(pi);
26930 co.alpha = jauAnp(co.alpha);
26931
26932 return co;
26933 /* Finished. */
26934
26935
26936 }
26937
26938 /**
26939 * ICRS RA,Dec to observed place. The caller supplies UTC, site
26940 * coordinates, ambient air conditions and observing wavelength.
26941 *
26942 * SOFA models are used for the Earth ephemeris, bias-precession-
26943 * nutation, Earth orientation and refraction.
26944 *
26945 *<p>This function is derived from the International Astronomical Union's
26946 * SOFA (Standards of Fundamental Astronomy) software collection.
26947 *
26948 *<p>Status: support function.
26949 *
26950 *<!-- Given: -->
26951 * @param rc double ICRS right ascension at J2000.0 (radians, Note 1)
26952 * @param dc double ICRS right ascension at J2000.0 (radians, Note 1)
26953 * @param pr double RA proper motion (radians/year; Note 2)
26954 * @param pd double Dec proper motion (radians/year)
26955 * @param px double parallax (arcsec)
26956 * @param rv double radial velocity (km/s, +ve if receding)
26957 * @param utc1 double UTC as a 2-part...
26958 * @param utc2 double ...quasi Julian Date (Notes 3-4)
26959 * @param dut1 double UT1-UTC (seconds, Note 5)
26960 * @param elong double longitude (radians, east +ve, Note 6)
26961 * @param phi double latitude (geodetic, radians, Note 6)
26962 * @param hm double height above ellipsoid (m, geodetic, Notes 6,8)
26963 * @param xp double polar motion coordinates (radians, Note 7)
26964 * @param yp double polar motion coordinates (radians, Note 7)
26965 * @param phpa double pressure at the observer (hPa = mB, Note 8)
26966 * @param tc double ambient temperature at the observer (deg C)
26967 * @param rh double relative humidity at the observer (range 0-1)
26968 * @param wl double wavelength (micrometers, Note 9)
26969 *
26970 *<!-- Returned:-->
26971 * @return aob double* <b>Returned</b> observed azimuth (radians: N=0,E=90)
26972 * zob double* <b>Returned</b> observed zenith distance (radians)
26973 * hob double* <b>Returned</b> observed hour angle (radians)
26974 * dob double* <b>Returned</b> observed declination (radians)
26975 * rob double* <b>Returned</b> observed right ascension (CIO-based, radians)
26976 * eo double* <b>Returned</b> equation of the origins (ERA-GST)
26977 *
26978 * @throws JSOFAInternalError an internal error has occured
26979 * @throws JSOFAIllegalParameter int status: <b>Returned</b> +1 = dubious year (Note 4)
26980 * 0 = <b>Returned</b> OK
26981 * -1 = <b>Returned</b> unacceptable date
26982 *
26983 *<p>Notes:
26984 * <ol>
26985 *
26986 * <li> Star data for an epoch other than J2000.0 (for example from the
26987 * Hipparcos catalog, which has an epoch of J1991.25) will require
26988 * a preliminary call to iauPmsafe before use.
26989 *
26990 * <li> The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
26991 *
26992 * <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
26993 * convenient way between the two arguments, for example where utc1
26994 * is the Julian Day Number and utc2 is the fraction of a day.
26995 *
26996 * <p>However, JD cannot unambiguously represent UTC during a leap
26997 * second unless special measures are taken. The convention in the
26998 * present function is that the JD day represents UTC days whether
26999 * the length is 86399, 86400 or 86401 SI seconds.
27000 *
27001 * <p>Applications should use the function iauDtf2d to convert from
27002 * calendar date and time of day into 2-part quasi Julian Date, as
27003 * it implements the leap-second-ambiguity convention just
27004 * described.
27005 *
27006 * <li> The warning status "dubious year" flags UTCs that predate the
27007 * introduction of the time scale or that are too far in the
27008 * future to be trusted. See iauDat for further details.
27009 *
27010 * <li> UT1-UTC is tabulated in IERS bulletins. It increases by exactly
27011 * one second at the end of each positive UTC leap second,
27012 * introduced in order to keep UT1-UTC within +/- 0.9s. n.b. This
27013 * practice is under review, and in the future UT1-UTC may grow
27014 * essentially without limit.
27015 *
27016 * <li> The geographical coordinates are with respect to the WGS84
27017 * reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN: the
27018 * longitude required by the present function is east-positive
27019 * (i.e. right-handed), in accordance with geographical convention.
27020 *
27021 * <li> The polar motion xp,yp can be obtained from IERS bulletins. The
27022 * values are the coordinates (in radians) of the Celestial
27023 * Intermediate Pole with respect to the International Terrestrial
27024 * Reference System (see IERS Conventions 2003), measured along the
27025 * meridians 0 and 90 deg west respectively. For many
27026 * applications, xp and yp can be set to zero.
27027 *
27028 * <li> If hm, the height above the ellipsoid of the observing station
27029 * in meters, is not known but phpa, the pressure in hPa (=mB),
27030 * is available, an adequate estimate of hm can be obtained from
27031 * the expression
27032 *
27033 * <p>hm = -29.3 * tsl * log ( phpa / 1013.25 );
27034 *
27035 * <p>where tsl is the approximate sea-level air temperature in K
27036 * (See Astrophysical Quantities, C.W.Allen, 3rd edition, section
27037 * 52). Similarly, if the pressure phpa is not known, it can be
27038 * estimated from the height of the observing station, hm, as
27039 * follows:
27040 *
27041 * <p>phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) );
27042 *
27043 * <p>Note, however, that the refraction is nearly proportional to
27044 * the pressure and that an accurate phpa value is important for
27045 * precise work.
27046 *
27047 * <li> The argument wl specifies the observing wavelength in
27048 * micrometers. The transition from optical to radio is assumed to
27049 * occur at 100 micrometers (about 3000 GHz).
27050 *
27051 * <li> The accuracy of the result is limited by the corrections for
27052 * refraction, which use a simple A*tan(z) + B*tan^3(z) model.
27053 * Providing the meteorological parameters are known accurately and
27054 * there are no gross local effects, the predicted observed
27055 * coordinates should be within 0.05 arcsec (optical) or 1 arcsec
27056 * (radio) for a zenith distance of less than 70 degrees, better
27057 * than 30 arcsec (optical or radio) at 85 degrees and better
27058 * than 20 arcmin (optical) or 30 arcmin (radio) at the horizon.
27059 *
27060 * <p>Without refraction, the complementary functions iauAtco13 and
27061 * iauAtoc13 are self-consistent to better than 1 microarcsecond
27062 * all over the celestial sphere. With refraction included,
27063 * consistency falls off at high zenith distances, but is still
27064 * better than 0.05 arcsec at 85 degrees.
27065 *
27066 * <li> "Observed" Az,ZD means the position that would be seen by a
27067 * perfect geodetically aligned theodolite. (Zenith distance is
27068 * used rather than altitude in order to reflect the fact that no
27069 * allowance is made for depression of the horizon.) This is
27070 * related to the observed HA,Dec via the standard rotation, using
27071 * the geodetic latitude (corrected for polar motion), while the
27072 * observed HA and RA are related simply through the Earth rotation
27073 * angle and the site longitude. "Observed" RA,Dec or HA,Dec thus
27074 * means the position that would be seen by a perfect equatorial
27075 * with its polar axis aligned to the Earth's axis of rotation.
27076 *
27077 * <li> It is advisable to take great care with units, as even unlikely
27078 * values of the input parameters are accepted and processed in
27079 * accordance with the models used.
27080 *
27081 * </ol>
27082 * Called:
27083 * <ul>
27084 * <li>{@link #jauApco13} astrometry parameters, ICRS-observed, 2013
27085 * <li>{@link #jauAtciq} quick ICRS to CIRS
27086 * <li>{@link #jauAtioq} quick ICRS to observed
27087 *
27088 * </ul>
27089 *@version 2013 October 9
27090 *
27091 *@since JSOFA release 20131202
27092 *
27093 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
27094 * @throws JSOFAInternalError an internal error has occured
27095 * @throws JSOFAIllegalParameter
27096 */
27097 public static ObservedPositionEO jauAtco13(double rc, double dc,
27098 double pr, double pd, double px, double rv,
27099 double utc1, double utc2, double dut1,
27100 double elong, double phi, double hm, double xp, double yp,
27101 double phpa, double tc, double rh, double wl) throws JSOFAIllegalParameter, JSOFAInternalError
27102 {
27103 Astrom astrom = new Astrom();
27104
27105
27106 /* Star-independent astrometry parameters. */
27107 double eo = jauApco13(utc1, utc2, dut1, elong, phi, hm, xp, yp,
27108 phpa, tc, rh, wl, astrom);
27109
27110 /* Transform ICRS to CIRS. */
27111 SphericalCoordinate co = jauAtciq(rc, dc, pr, pd, px, rv, astrom);
27112
27113 /* Transform CIRS to observed. */
27114 ObservedPosition obs = jauAtioq(co.alpha, co.delta, astrom);
27115
27116
27117 return new ObservedPositionEO(obs, eo);
27118
27119 /* Finished. */
27120
27121
27122 }
27123
27124 /**
27125 * Transform star RA,Dec from geocentric CIRS to ICRS astrometric.
27126 *
27127 *<p>This function is derived from the International Astronomical Union's
27128 * SOFA (Standards of Fundamental Astronomy) software collection.
27129 *
27130 *<p>Status: support function.
27131 *
27132 *<!-- Given: -->
27133 * @param ri double CIRS geocentric RA,Dec (radians)
27134 * @param di double CIRS geocentric RA,Dec (radians)
27135 * @param date1 double TDB as a 2-part...
27136 * @param date2 double ...Julian Date (Note 1)
27137 *
27138 *<!-- Returned:-->
27139 * @return rc,dc double <b>Returned</b> ICRS astrometric RA,Dec (radians)
27140 * eo double <b>Returned</b> equation of the origins (ERA-GST, Note 4)
27141 *
27142 *<p>Notes:
27143 * <ol>
27144 *
27145 * <li> The TDB date date1+date2 is a Julian Date, apportioned in any
27146 * convenient way between the two arguments. For example,
27147 * JD(TDB)=2450123.7 could be expressed in any of these ways, among
27148 * others:
27149 *
27150 * date1 date2
27151 *
27152 * 2450123.7 0.0 (JD method)
27153 * 2451545.0 -1421.3 (J2000 method)
27154 * 2400000.5 50123.2 (MJD method)
27155 * 2450123.5 0.2 (date & time method)
27156 *
27157 * <p>The JD method is the most natural and convenient to use in cases
27158 * where the loss of several decimal digits of resolution is
27159 * acceptable. The J2000 method is best matched to the way the
27160 * argument is handled internally and will deliver the optimum
27161 * resolution. The MJD method and the date & time methods are both
27162 * good compromises between resolution and convenience. For most
27163 * applications of this function the choice will not be at all
27164 * critical.
27165 *
27166 * <p>TT can be used instead of TDB without any significant impact on
27167 * accuracy.
27168 *
27169 * <li> Iterative techniques are used for the aberration and light
27170 * deflection corrections so that the functions iauAtic13 (or
27171 * iauAticq) and iauAtci13 (or iauAtciq) are accurate inverses;
27172 * even at the edge of the Sun's disk the discrepancy is only about
27173 * 1 nanoarcsecond.
27174 *
27175 * <li> The available accuracy is better than 1 milliarcsecond, limited
27176 * mainly by the precession-nutation model that is used, namely
27177 * IAU 2000A/2006. Very close to solar system bodies, additional
27178 * errors of up to several milliarcseconds can occur because of
27179 * unmodeled light deflection; however, the Sun's contribution is
27180 * taken into account, to first order. The accuracy limitations of
27181 * the SOFA function iauEpv00 (used to compute Earth position and
27182 * velocity) can contribute aberration errors of up to
27183 * 5 microarcseconds. Light deflection at the Sun's limb is
27184 * uncertain at the 0.4 mas level.
27185 *
27186 * <li> Should the transformation to (equinox based) J2000.0 mean place
27187 * be required rather than (CIO based) ICRS coordinates, subtract the
27188 * equation of the origins from the returned right ascension:
27189 * RA = RI - EO. (The iauAnp function can then be applied, as
27190 * required, to keep the result in the conventional 0-2pi range.)
27191 *
27192 * </ol>
27193 * Called:
27194 * <ul>
27195 * <li>{@link #jauApci13} astrometry parameters, ICRS-CIRS, 2013
27196 * <li>{@link #jauAticq} quick CIRS to ICRS astrometric
27197 *
27198 * </ul>
27199 *@version 2013 October 9
27200 *
27201 *@since JSOFA release 20131202
27202 *
27203 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
27204 */
27205 public static SphericalCoordinateEO jauAtic13(double ri, double di, double date1, double date2)
27206 {
27207 /* Star-independent astrometry parameters */
27208 Astrom astrom = new Astrom();
27209
27210
27211 /* Star-independent astrometry parameters. */
27212 double eo = jauApci13(date1, date2, astrom);
27213
27214 /* CIRS to ICRS astrometric. */
27215 SphericalCoordinate co = jauAticq(ri, di, astrom);
27216
27217 return new SphericalCoordinateEO(co,eo);
27218 /* Finished. */
27219
27220
27221 }
27222
27223 /**
27224 * Quick CIRS RA,Dec to ICRS astrometric place, given the star-
27225 * independent astrometry parameters.
27226 *
27227 * Use of this function is appropriate when efficiency is important and
27228 * where many star positions are all to be transformed for one date.
27229 * The star-independent astrometry parameters can be obtained by
27230 * calling one of the functions iauApci[13], iauApcg[13], iauApco[13]
27231 * or iauApcs[13].
27232 *
27233 *<p>This function is derived from the International Astronomical Union's
27234 * SOFA (Standards of Fundamental Astronomy) software collection.
27235 *
27236 *<p>Status: support function.
27237 *
27238 *<!-- Given: -->
27239 * @param ri double CIRS RA,Dec (radians)
27240 * @param di double CIRS RA,Dec (radians)
27241 * @param astrom star-independent astrometry parameters:
27242 *
27243 *<!-- Returned:-->
27244 * @return rc,dc double <b>Returned</b> ICRS astrometric RA,Dec (radians)
27245 *
27246 *<p>Notes:
27247 * <ol>
27248 *
27249 * <li> Only the Sun is taken into account in the light deflection
27250 * correction.
27251 *
27252 * <li> Iterative techniques are used for the aberration and light
27253 * deflection corrections so that the functions iauAtic13 (or
27254 * iauAticq) and iauAtci13 (or iauAtciq) are accurate inverses;
27255 * even at the edge of the Sun's disk the discrepancy is only about
27256 * 1 nanoarcsecond.
27257 *
27258 * </ol>
27259 * Called:
27260 * <ul>
27261 * <li>{@link #jauS2c} spherical coordinates to unit vector
27262 * <li>{@link #jauTrxp} product of transpose of r-matrix and p-vector
27263 * <li>{@link #jauZp} zero p-vector
27264 * <li>{@link #jauAb} stellar aberration
27265 * <li>{@link #jauLdsun} light deflection by the Sun
27266 * <li>{@link #jauC2s} p-vector to spherical
27267 * <li>{@link #jauAnp} normalize angle into range +/- pi
27268 *
27269 * </ul>
27270 *@version 2013 October 9
27271 *
27272 *@since JSOFA release 20131202
27273 *
27274 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
27275 */
27276 public static SphericalCoordinate jauAticq(double ri, double di, Astrom astrom )
27277 {
27278 int j, i;
27279 double pi[] , ppr[], pnat[] = new double[3], pco[] = new double[3], w, d[] = new double[3],
27280 before[] = new double[3], r2, r,
27281 after[];
27282
27283
27284 /* CIRS RA,Dec to Cartesian. */
27285 pi = jauS2c(ri, di);
27286
27287 /* Bias-precession-nutation, giving GCRS proper direction. */
27288 ppr = jauTrxp(astrom.bpn, pi);
27289
27290 /* Aberration, giving GCRS natural direction. */
27291 jauZp(d);
27292 for (j = 0; j < 2; j++) {
27293 r2 = 0.0;
27294 for (i = 0; i < 3; i++) {
27295 w = ppr[i] - d[i];
27296 before[i] = w;
27297 r2 += w*w;
27298 }
27299 r = sqrt(r2);
27300 for (i = 0; i < 3; i++) {
27301 before[i] /= r;
27302 }
27303 after = jauAb(before, astrom.v, astrom.em, astrom.bm1);
27304 r2 = 0.0;
27305 for (i = 0; i < 3; i++) {
27306 d[i] = after[i] - before[i];
27307 w = ppr[i] - d[i];
27308 pnat[i] = w;
27309 r2 += w*w;
27310 }
27311 r = sqrt(r2);
27312 for (i = 0; i < 3; i++) {
27313 pnat[i] /= r;
27314 }
27315 }
27316
27317 /* Light deflection by the Sun, giving BCRS coordinate direction. */
27318 jauZp(d);
27319 for (j = 0; j < 5; j++) {
27320 r2 = 0.0;
27321 for (i = 0; i < 3; i++) {
27322 w = pnat[i] - d[i];
27323 before[i] = w;
27324 r2 += w*w;
27325 }
27326 r = sqrt(r2);
27327 for (i = 0; i < 3; i++) {
27328 before[i] /= r;
27329 }
27330 after = jauLdsun(before, astrom.eh, astrom.em);
27331 r2 = 0.0;
27332 for (i = 0; i < 3; i++) {
27333 d[i] = after[i] - before[i];
27334 w = pnat[i] - d[i];
27335 pco[i] = w;
27336 r2 += w*w;
27337 }
27338 r = sqrt(r2);
27339 for (i = 0; i < 3; i++) {
27340 pco[i] /= r;
27341 }
27342 }
27343
27344 /* ICRS astrometric RA,Dec. */
27345 SphericalCoordinate co = jauC2s(pco);
27346 co.alpha = jauAnp(co.alpha);
27347
27348 return co;
27349 /* Finished. */
27350
27351
27352 }
27353
27354 /**
27355 * Quick CIRS to ICRS astrometric place transformation, given the star-
27356 * independent astrometry parameters plus a list of light-deflecting
27357 * bodies.
27358 *
27359 * Use of this function is appropriate when efficiency is important and
27360 * where many star positions are all to be transformed for one date.
27361 * The star-independent astrometry parameters can be obtained by
27362 * calling one of the functions iauApci[13], iauApcg[13], iauApco[13]
27363 * or iauApcs[13].
27364 *
27365 * If the only light-deflecting body to be taken into account is the
27366 * Sun, the iauAticq function can be used instead.
27367 *
27368 *<p>This function is derived from the International Astronomical Union's
27369 * SOFA (Standards of Fundamental Astronomy) software collection.
27370 *
27371 *<p>Status: support function.
27372 *
27373 *<!-- Given: -->
27374 * @param ri double CIRS RA,Dec (radians)
27375 * @param di double CIRS RA,Dec (radians)
27376 * @param astrom star-independent astrometry parameters:
27377 * @param n number of bodies.
27378 * @param b[] data for each of the n bodies.
27379 *
27380 *<!-- Returned:-->
27381 * @return ICRS astrometric RA,Dec (radians)
27382 *
27383 *<p>Notes:
27384 * <ol>
27385 *
27386 * <li> Iterative techniques are used for the aberration and light
27387 * deflection corrections so that the functions iauAticqn and
27388 * iauAtciqn are accurate inverses; even at the edge of the Sun's
27389 * disk the discrepancy is only about 1 nanoarcsecond.
27390 *
27391 * <li> If the only light-deflecting body to be taken into account is the
27392 * Sun, the iauAticq function can be used instead.
27393 *
27394 * <li> The struct b contains n entries, one for each body to be
27395 * considered. If n = 0, no gravitational light deflection will be
27396 * applied, not even for the Sun.
27397 *
27398 * <li> The struct b should include an entry for the Sun as well as for
27399 * any planet or other body to be taken into account. The entries
27400 * should be in the order in which the light passes the body.
27401 *
27402 * <li> In the entry in the b struct for body i, the mass parameter
27403 * b[i].bm can, as required, be adjusted in order to allow for such
27404 * effects as quadrupole field.
27405 *
27406 * <li> The deflection limiter parameter b[i].dl is phi^2/2, where phi is
27407 * the angular separation (in radians) between star and body at
27408 * which limiting is applied. As phi shrinks below the chosen
27409 * threshold, the deflection is artificially reduced, reaching zero
27410 * for phi = 0. Example values suitable for a terrestrial
27411 * observer, together with masses, are as follows:
27412 *
27413 * <p>body i b[i].bm b[i].dl
27414 *
27415 * <p>Sun 1.0 6e-6
27416 * Jupiter 0.00095435 3e-9
27417 * Saturn 0.00028574 3e-10
27418 *
27419 * <li> For efficiency, validation of the contents of the b array is
27420 * omitted. The supplied masses must be greater than zero, the
27421 * position and velocity vectors must be right, and the deflection
27422 * limiter greater than zero.
27423 *
27424 * </ol>
27425 * Called:
27426 * <ul>
27427 * <li>{@link #jauS2c} spherical coordinates to unit vector
27428 * <li>{@link #jauTrxp} product of transpose of r-matrix and p-vector
27429 * <li>{@link #jauZp} zero p-vector
27430 * <li>{@link #jauAb} stellar aberration
27431 * <li>{@link #jauLdn} light deflection by n bodies
27432 * <li>{@link #jauC2s} p-vector to spherical
27433 * <li>{@link #jauAnp} normalize angle into range +/- pi
27434 *
27435 * </ul>
27436 *@version 2013 October 9
27437 *
27438 *@since JSOFA release 20131202
27439 *
27440 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
27441 */
27442 public static SphericalCoordinate jauAticqn(double ri, double di, Astrom astrom,
27443 int n, Ldbody b[])
27444 {
27445 int j, i;
27446 double pi[], ppr[], pnat[] = new double[3], pco[] = new double[3], w, d[] = new double[3], before[] = new double[3], r2, r,
27447 after[];
27448
27449
27450 /* CIRS RA,Dec to Cartesian. */
27451 pi = jauS2c(ri, di);
27452
27453 /* Bias-precession-nutation, giving GCRS proper direction. */
27454 ppr = jauTrxp(astrom.bpn, pi);
27455
27456 /* Aberration, giving GCRS natural direction. */
27457 jauZp(d);
27458 for (j = 0; j < 2; j++) {
27459 r2 = 0.0;
27460 for (i = 0; i < 3; i++) {
27461 w = ppr[i] - d[i];
27462 before[i] = w;
27463 r2 += w*w;
27464 }
27465 r = sqrt(r2);
27466 for (i = 0; i < 3; i++) {
27467 before[i] /= r;
27468 }
27469 after = jauAb(before, astrom.v, astrom.em, astrom.bm1);
27470 r2 = 0.0;
27471 for (i = 0; i < 3; i++) {
27472 d[i] = after[i] - before[i];
27473 w = ppr[i] - d[i];
27474 pnat[i] = w;
27475 r2 += w*w;
27476 }
27477 r = sqrt(r2);
27478 for (i = 0; i < 3; i++) {
27479 pnat[i] /= r;
27480 }
27481 }
27482
27483 /* Light deflection, giving BCRS coordinate direction. */
27484 jauZp(d);
27485 for (j = 0; j < 5; j++) {
27486 r2 = 0.0;
27487 for (i = 0; i < 3; i++) {
27488 w = pnat[i] - d[i];
27489 before[i] = w;
27490 r2 += w*w;
27491 }
27492 r = sqrt(r2);
27493 for (i = 0; i < 3; i++) {
27494 before[i] /= r;
27495 }
27496 after = jauLdn(n, b, astrom.eb, before);
27497 r2 = 0.0;
27498 for (i = 0; i < 3; i++) {
27499 d[i] = after[i] - before[i];
27500 w = pnat[i] - d[i];
27501 pco[i] = w;
27502 r2 += w*w;
27503 }
27504 r = sqrt(r2);
27505 for (i = 0; i < 3; i++) {
27506 pco[i] /= r;
27507 }
27508 }
27509
27510 /* ICRS astrometric RA,Dec. */
27511 SphericalCoordinate co = jauC2s(pco);
27512 co.alpha = jauAnp(co.alpha);
27513
27514 return co;
27515 /* Finished. */
27516
27517
27518 }
27519
27520 /**
27521 * Observed Position.
27522 * "Observed" Az,ZD means the position that would be seen by a
27523 * perfect geodetically aligned theodolite. (Zenith distance is
27524 * used rather than altitude in order to reflect the fact that no
27525 * allowance is made for depression of the horizon.) This is
27526 * related to the observed HA,Dec via the standard rotation, using
27527 * the geodetic latitude (corrected for polar motion), while the
27528 * observed HA and RA are related simply through the Earth rotation
27529 * angle and the site longitude. "Observed" RA,Dec or HA,Dec thus
27530 * means the position that would be seen by a perfect equatorial
27531 * with its polar axis aligned to the Earth's axis of rotation..
27532 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 28 Mar 2014
27533 * @version $Revision$ $date$
27534 */
27535 public static class ObservedPosition{
27536 /** observed azimuth (radians: N=0,E=90) */
27537 public double aob;
27538
27539 /** observed zenith distance (radians) */
27540 public double zob;
27541
27542 /** observed Hour Angle (radians) */
27543 public double hob;
27544
27545 /** observed Declination (radians) */
27546 public double dob;
27547
27548 /** observed Right Ascension (radians) */
27549 public double rob;
27550 public ObservedPosition(double aob,
27551 double zob,
27552 double hob,
27553 double dob,
27554 double rob
27555 ) {
27556 this.aob = aob;
27557 this.zob = zob;
27558 this.hob = hob;
27559 this.dob = dob;
27560 this.rob = rob;
27561 }
27562 }
27563
27564 /**
27565 * Observed position with the equation of the origins.
27566 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 29 Mar 2014
27567 * @version $Revision$ $date$
27568 */
27569 public static class ObservedPositionEO {
27570 /**
27571 * observed position.
27572 */
27573 public ObservedPosition op;
27574 /**
27575 * The equation of the origins. The equation of the origins is the distance between the true
27576 * equinox and the celestial intermediate origin and, equivalently,
27577 * the difference between Earth rotation angle and Greenwich
27578 * apparent sidereal time (ERA-GST). It comprises the precession
27579 * (since J2000.0) in right ascension plus the equation of the
27580 * equinoxes (including the small correction terms).
27581 */
27582 public double eo;
27583 /**
27584 * @param op
27585 * @param eo
27586 */
27587 public ObservedPositionEO(ObservedPosition op, double eo) {
27588 this.op = op;
27589 this.eo = eo;
27590 }
27591
27592 }
27593
27594
27595
27596
27597 /**
27598 * CIRS RA,Dec to observed place. The caller supplies UTC, site
27599 * coordinates, ambient air conditions and observing wavelength.
27600 *
27601 *<p>This function is derived from the International Astronomical Union's
27602 * SOFA (Standards of Fundamental Astronomy) software collection.
27603 *
27604 *<p>Status: support function.
27605 *
27606 *<!-- Given: -->
27607 * @param ri double CIRS right ascension (CIO-based, radians)
27608 * @param di double CIRS declination (radians)
27609 * @param utc1 double UTC as a 2-part...
27610 * @param utc2 double ...quasi Julian Date (Notes 1,2)
27611 * @param dut1 double UT1-UTC (seconds, Note 3)
27612 * @param elong double longitude (radians, east +ve, Note 4)
27613 * @param phi double geodetic latitude (radians, Note 4)
27614 * @param hm double height above ellipsoid (m, geodetic Notes 4,6)
27615 * @param xp double polar motion coordinates (radians, Note 5)
27616 * @param yp double polar motion coordinates (radians, Note 5)
27617 * @param phpa double pressure at the observer (hPa = mB, Note 6)
27618 * @param tc double ambient temperature at the observer (deg C)
27619 * @param rh double relative humidity at the observer (range 0-1)
27620 * @param wl double wavelength (micrometers, Note 7)
27621 *
27622 *<!-- Returned:-->
27623 * @return aob double* <b>Returned</b> observed azimuth (radians: N=0,E=90)
27624 * zob double* <b>Returned</b> observed zenith distance (radians)
27625 * hob double* <b>Returned</b> observed hour angle (radians)
27626 * dob double* <b>Returned</b> observed declination (radians)
27627 * rob double* <b>Returned</b> observed right ascension (CIO-based, radians)
27628 *
27629 * @throws JSOFAInternalError an internal error has occured
27630 * @throws JSOFAIllegalParameter int status: <b>Returned</b> +1 = dubious year (Note 2)
27631 * 0 = <b>Returned</b> OK
27632 * -1 = <b>Returned</b> unacceptable date
27633 *
27634 *<p>Notes:
27635 * <ol>
27636 *
27637 * <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
27638 * convenient way between the two arguments, for example where utc1
27639 * is the Julian Day Number and utc2 is the fraction of a day.
27640 *
27641 * <p>However, JD cannot unambiguously represent UTC during a leap
27642 * second unless special measures are taken. The convention in the
27643 * present function is that the JD day represents UTC days whether
27644 * the length is 86399, 86400 or 86401 SI seconds.
27645 *
27646 * <p>Applications should use the function iauDtf2d to convert from
27647 * calendar date and time of day into 2-part quasi Julian Date, as
27648 * it implements the leap-second-ambiguity convention just
27649 * described.
27650 *
27651 * <li> The warning status "dubious year" flags UTCs that predate the
27652 * introduction of the time scale or that are too far in the
27653 * future to be trusted. See iauDat for further details.
27654 *
27655 * <li> UT1-UTC is tabulated in IERS bulletins. It increases by exactly
27656 * one second at the end of each positive UTC leap second,
27657 * introduced in order to keep UT1-UTC within +/- 0.9s. n.b. This
27658 * practice is under review, and in the future UT1-UTC may grow
27659 * essentially without limit.
27660 *
27661 * <li> The geographical coordinates are with respect to the WGS84
27662 * reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN: the
27663 * longitude required by the present function is east-positive
27664 * (i.e. right-handed), in accordance with geographical convention.
27665 *
27666 * <li> The polar motion xp,yp can be obtained from IERS bulletins. The
27667 * values are the coordinates (in radians) of the Celestial
27668 * Intermediate Pole with respect to the International Terrestrial
27669 * Reference System (see IERS Conventions 2003), measured along the
27670 * meridians 0 and 90 deg west respectively. For many
27671 * applications, xp and yp can be set to zero.
27672 *
27673 * <li> If hm, the height above the ellipsoid of the observing station
27674 * in meters, is not known but phpa, the pressure in hPa (=mB), is
27675 * available, an adequate estimate of hm can be obtained from the
27676 * expression
27677 *
27678 * <p>hm = -29.3 * tsl * log ( phpa / 1013.25 );
27679 *
27680 * <p>where tsl is the approximate sea-level air temperature in K
27681 * (See Astrophysical Quantities, C.W.Allen, 3rd edition, section
27682 * 52). Similarly, if the pressure phpa is not known, it can be
27683 * estimated from the height of the observing station, hm, as
27684 * follows:
27685 *
27686 * <p>phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) );
27687 *
27688 * <p>Note, however, that the refraction is nearly proportional to
27689 * the pressure and that an accurate phpa value is important for
27690 * precise work.
27691 *
27692 * <li> The argument wl specifies the observing wavelength in
27693 * micrometers. The transition from optical to radio is assumed to
27694 * occur at 100 micrometers (about 3000 GHz).
27695 *
27696 * <li> "Observed" Az,ZD means the position that would be seen by a
27697 * perfect geodetically aligned theodolite. (Zenith distance is
27698 * used rather than altitude in order to reflect the fact that no
27699 * allowance is made for depression of the horizon.) This is
27700 * related to the observed HA,Dec via the standard rotation, using
27701 * the geodetic latitude (corrected for polar motion), while the
27702 * observed HA and RA are related simply through the Earth rotation
27703 * angle and the site longitude. "Observed" RA,Dec or HA,Dec thus
27704 * means the position that would be seen by a perfect equatorial
27705 * with its polar axis aligned to the Earth's axis of rotation.
27706 *
27707 * <li> The accuracy of the result is limited by the corrections for
27708 * refraction, which use a simple A*tan(z) + B*tan^3(z) model.
27709 * Providing the meteorological parameters are known accurately and
27710 * there are no gross local effects, the predicted astrometric
27711 * coordinates should be within 0.05 arcsec (optical) or 1 arcsec
27712 * (radio) for a zenith distance of less than 70 degrees, better
27713 * than 30 arcsec (optical or radio) at 85 degrees and better
27714 * than 20 arcmin (optical) or 30 arcmin (radio) at the horizon.
27715 *
27716 * <li> The complementary functions iauAtio13 and iauAtoi13 are self-
27717 * consistent to better than 1 microarcsecond all over the
27718 * celestial sphere.
27719 *
27720 * <li> It is advisable to take great care with units, as even unlikely
27721 * values of the input parameters are accepted and processed in
27722 * accordance with the models used.
27723 *
27724 * </ol>
27725 * Called:
27726 * <ul>
27727 * <li>{@link #jauApio13} astrometry parameters, CIRS-observed, 2013
27728 * <li>{@link #jauAtioq} quick CIRS to observed
27729 *
27730 * </ul>
27731 *@version 2013 October 9
27732 *
27733 *@since JSOFA release 20131202
27734 *
27735 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
27736 * @throws JSOFAInternalError an internal error has occured
27737 * @throws JSOFAIllegalParameter
27738 */
27739 public static ObservedPosition jauAtio13(double ri, double di,
27740 double utc1, double utc2, double dut1,
27741 double elong, double phi, double hm, double xp, double yp,
27742 double phpa, double tc, double rh, double wl) throws JSOFAIllegalParameter, JSOFAInternalError
27743 {
27744 Astrom astrom = new Astrom();
27745
27746
27747 /* Star-independent astrometry parameters for CIRS->observed. */
27748 jauApio13(utc1, utc2, dut1, elong, phi, hm, xp, yp,
27749 phpa, tc, rh, wl, astrom);
27750
27751 /* Transform CIRS to observed. */
27752 return jauAtioq(ri, di, astrom);
27753
27754 /* Finished. */
27755
27756
27757 }
27758
27759 /**
27760 * Quick CIRS to observed place transformation.
27761 *
27762 * Use of this function is appropriate when efficiency is important and
27763 * where many star positions are all to be transformed for one date.
27764 * The star-independent astrometry parameters can be obtained by
27765 * calling iauApio[13] or iauApco[13].
27766 *
27767 *<p>This function is derived from the International Astronomical Union's
27768 * SOFA (Standards of Fundamental Astronomy) software collection.
27769 *
27770 *<p>Status: support function.
27771 *
27772 *<!-- Given: -->
27773 * @param ri double CIRS right ascension
27774 * @param di double CIRS declination
27775 * @param astrom star-independent astrometry parameters:
27776 *
27777 *<!-- Returned:-->
27778 * @return aob double* <b>Returned</b> observed azimuth (radians: N=0,E=90)
27779 * zob double* <b>Returned</b> observed zenith distance (radians)
27780 * hob double* <b>Returned</b> observed hour angle (radians)
27781 * dob double* <b>Returned</b> observed declination (radians)
27782 * rob double* <b>Returned</b> observed right ascension (CIO-based, radians)
27783 *
27784 *<p>Notes:
27785 * <ol>
27786 *
27787 * <li> This function returns zenith distance rather than altitude in
27788 * order to reflect the fact that no allowance is made for
27789 * depression of the horizon.
27790 *
27791 * <li> The accuracy of the result is limited by the corrections for
27792 * refraction, which use a simple A*tan(z) + B*tan^3(z) model.
27793 * Providing the meteorological parameters are known accurately and
27794 * there are no gross local effects, the predicted observed
27795 * coordinates should be within 0.05 arcsec (optical) or 1 arcsec
27796 * (radio) for a zenith distance of less than 70 degrees, better
27797 * than 30 arcsec (optical or radio) at 85 degrees and better
27798 * than 20 arcmin (optical) or 30 arcmin (radio) at the horizon.
27799 *
27800 * <p>Without refraction, the complementary functions iauAtioq and
27801 * iauAtoiq are self-consistent to better than 1 microarcsecond all
27802 * over the celestial sphere. With refraction included, consistency
27803 * falls off at high zenith distances, but is still better than
27804 * 0.05 arcsec at 85 degrees.
27805 *
27806 * <li> It is advisable to take great care with units, as even unlikely
27807 * values of the input parameters are accepted and processed in
27808 * accordance with the models used.
27809 *
27810 * <li> The CIRS RA,Dec is obtained from a star catalog mean place by
27811 * allowing for space motion, parallax, the Sun's gravitational lens
27812 * effect, annual aberration and precession-nutation. For star
27813 * positions in the ICRS, these effects can be applied by means of
27814 * the iauAtci13 (etc.) functions. Starting from classical "mean
27815 * place" systems, additional transformations will be needed first.
27816 *
27817 * <li> "Observed" Az,El means the position that would be seen by a
27818 * perfect geodetically aligned theodolite. This is obtained from
27819 * the CIRS RA,Dec by allowing for Earth orientation and diurnal
27820 * aberration, rotating from equator to horizon coordinates, and
27821 * then adjusting for refraction. The HA,Dec is obtained by
27822 * rotating back into equatorial coordinates, and is the position
27823 * that would be seen by a perfect equatorial with its polar axis
27824 * aligned to the Earth's axis of rotation. Finally, the RA is
27825 * obtained by subtracting the HA from the local ERA.
27826 *
27827 * <li> The star-independent CIRS-to-observed-place parameters in ASTROM
27828 * may be computed with iauApio[13] or iauApco[13]. If nothing has
27829 * changed significantly except the time, iauAper[13] may be used to
27830 * perform the requisite adjustment to the astrom structure.
27831 *
27832 * </ol>
27833 * Called:
27834 * <ul>
27835 * <li>{@link #jauS2c} spherical coordinates to unit vector
27836 * <li>{@link #jauC2s} p-vector to spherical
27837 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
27838 *
27839 * </ul>
27840 *@version 2013 December 5
27841 *
27842 *@since JSOFA release 20131202
27843 *
27844 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
27845 */
27846 public static ObservedPosition jauAtioq(double ri, double di, Astrom astrom)
27847 {
27848 /* Minimum cos(alt) and sin(alt) for refraction purposes */
27849 final double CELMIN = 1e-6;
27850 final double SELMIN = 0.05;
27851
27852 double v[] = new double[3], x, y, z, xhd, yhd, zhd, f, xhdt, yhdt, zhdt,
27853 xaet, yaet, zaet, azobs, r, tz, w, del, cosdel,
27854 xaeo, yaeo, zaeo, zdobs, hmobs, dcobs, raobs;
27855
27856 /*--------------------------------------------------------------------*/
27857
27858 /* CIRS RA,Dec to Cartesian -HA,Dec. */
27859 v = jauS2c(ri-astrom.eral, di);
27860 x = v[0];
27861 y = v[1];
27862 z = v[2];
27863
27864 /* Polar motion. */
27865 xhd = x + astrom.xpl*z;
27866 yhd = y - astrom.ypl*z;
27867 zhd = z - astrom.xpl*x + astrom.ypl*y;
27868
27869 /* Diurnal aberration. */
27870 f = ( 1.0 - astrom.diurab*yhd );
27871 xhdt = f * xhd;
27872 yhdt = f * ( yhd + astrom.diurab );
27873 zhdt = f * zhd;
27874
27875 /* Cartesian -HA,Dec to Cartesian Az,El (S=0,E=90). */
27876 xaet = astrom.sphi*xhdt - astrom.cphi*zhdt;
27877 yaet = yhdt;
27878 zaet = astrom.cphi*xhdt + astrom.sphi*zhdt;
27879
27880 /* Azimuth (N=0,E=90). */
27881 azobs = ( xaet != 0.0 || yaet != 0.0 ) ? atan2(yaet,-xaet) : 0.0;
27882
27883 /* ---------- */
27884 /* Refraction */
27885 /* ---------- */
27886
27887 /* Cosine and sine of altitude, with precautions. */
27888 r = sqrt(xaet*xaet + yaet*yaet);
27889 r = r > CELMIN ? r : CELMIN;
27890 z = zaet > SELMIN ? zaet : SELMIN;
27891
27892 /* A*tan(z)+B*tan^3(z) model, with Newton-Raphson correction. */
27893 tz = r/z;
27894 w = astrom.refb*tz*tz;
27895 del = ( astrom.refa + w ) * tz /
27896 ( 1.0 + ( astrom.refa + 3.0*w ) / ( z*z ) );
27897
27898 /* Apply the change, giving observed vector. */
27899 cosdel = 1.0 - del*del/2.0;
27900 f = cosdel - del*z/r;
27901 xaeo = xaet*f;
27902 yaeo = yaet*f;
27903 zaeo = cosdel*zaet + del*r;
27904
27905 /* Observed ZD. */
27906 zdobs = atan2(sqrt(xaeo*xaeo+yaeo*yaeo), zaeo);
27907
27908 /* Az/El vector to HA,Dec vector (both right-handed). */
27909 v[0] = astrom.sphi*xaeo + astrom.cphi*zaeo;
27910 v[1] = yaeo;
27911 v[2] = - astrom.cphi*xaeo + astrom.sphi*zaeo;
27912
27913 /* To spherical -HA,Dec. */
27914 SphericalCoordinate co = jauC2s ( v);
27915 hmobs = co.alpha;
27916 dcobs = co.delta;
27917 /* Right ascension (with respect to CIO). */
27918 raobs = astrom.eral + hmobs;
27919
27920 /* Return the results. */
27921 return new ObservedPosition(
27922 jauAnp(azobs),
27923 zdobs,
27924 -hmobs,
27925 dcobs,
27926 jauAnp(raobs));
27927
27928 /* Finished. */
27929
27930
27931 }
27932
27933 /**
27934 * Observed place at a groundbased site to to ICRS astrometric RA,Dec.
27935 * The caller supplies UTC, site coordinates, ambient air conditions
27936 * and observing wavelength.
27937 *
27938 *<p>This function is derived from the International Astronomical Union's
27939 * SOFA (Standards of Fundamental Astronomy) software collection.
27940 *
27941 *<p>Status: support function.
27942 *
27943 *<!-- Given: -->
27944 * @param type char[] type of coordinates - "R", "H" or "A" (Notes 1,2)
27945 * @param ob1 double observed Az, HA or RA (radians; Az is N=0,E=90)
27946 * @param ob2 double observed ZD or Dec (radians)
27947 * @param utc1 double UTC as a 2-part...
27948 * @param utc2 double ...quasi Julian Date (Notes 3,4)
27949 * @param dut1 double UT1-UTC (seconds, Note 5)
27950 * @param elong double longitude (radians, east +ve, Note 6)
27951 * @param phi double geodetic latitude (radians, Note 6)
27952 * @param hm double height above ellipsoid (m, geodetic Notes 6,8)
27953 * @param xp double polar motion coordinates (radians, Note 7)
27954 * @param yp double polar motion coordinates (radians, Note 7)
27955 * @param phpa double pressure at the observer (hPa = mB, Note 8)
27956 * @param tc double ambient temperature at the observer (deg C)
27957 * @param rh double relative humidity at the observer (range 0-1)
27958 * @param wl double wavelength (micrometers, Note 9)
27959 *
27960 *<!-- Returned:-->
27961 * @return rc,dc double <b>Returned</b> ICRS astrometric RA,Dec (radians)
27962 *
27963 * @throws JSOFAInternalError an internal error has occured
27964 * @throws JSOFAIllegalParameter int status: <b>Returned</b> +1 = dubious year (Note 4)
27965 * 0 = <b>Returned</b> OK
27966 * -1 = <b>Returned</b> unacceptable date
27967 *
27968 *<p>Notes:
27969 * <ol>
27970 *
27971 * <li> "Observed" Az,ZD means the position that would be seen by a
27972 * perfect geodetically aligned theodolite. (Zenith distance is
27973 * used rather than altitude in order to reflect the fact that no
27974 * allowance is made for depression of the horizon.) This is
27975 * related to the observed HA,Dec via the standard rotation, using
27976 * the geodetic latitude (corrected for polar motion), while the
27977 * observed HA and RA are related simply through the Earth rotation
27978 * angle and the site longitude. "Observed" RA,Dec or HA,Dec thus
27979 * means the position that would be seen by a perfect equatorial
27980 * with its polar axis aligned to the Earth's axis of rotation.
27981 *
27982 * <li> Only the first character of the type argument is significant.
27983 * "R" or "r" indicates that ob1 and ob2 are the observed right
27984 * ascension and declination; "H" or "h" indicates that they are
27985 * hour angle (west +ve) and declination; anything else ("A" or
27986 * "a" is recommended) indicates that ob1 and ob2 are azimuth
27987 * (north zero, east 90 deg) and zenith distance.
27988 *
27989 * <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
27990 * convenient way between the two arguments, for example where utc1
27991 * is the Julian Day Number and utc2 is the fraction of a day.
27992 *
27993 * <p>However, JD cannot unambiguously represent UTC during a leap
27994 * second unless special measures are taken. The convention in the
27995 * present function is that the JD day represents UTC days whether
27996 * the length is 86399, 86400 or 86401 SI seconds.
27997 *
27998 * <p>Applications should use the function iauDtf2d to convert from
27999 * calendar date and time of day into 2-part quasi Julian Date, as
28000 * it implements the leap-second-ambiguity convention just
28001 * described.
28002 *
28003 * <li> The warning status "dubious year" flags UTCs that predate the
28004 * introduction of the time scale or that are too far in the
28005 * future to be trusted. See iauDat for further details.
28006 *
28007 * <li> UT1-UTC is tabulated in IERS bulletins. It increases by exactly
28008 * one second at the end of each positive UTC leap second,
28009 * introduced in order to keep UT1-UTC within +/- 0.9s. n.b. This
28010 * practice is under review, and in the future UT1-UTC may grow
28011 * essentially without limit.
28012 *
28013 * <li> The geographical coordinates are with respect to the WGS84
28014 * reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN: the
28015 * longitude required by the present function is east-positive
28016 * (i.e. right-handed), in accordance with geographical convention.
28017 *
28018 * <li> The polar motion xp,yp can be obtained from IERS bulletins. The
28019 * values are the coordinates (in radians) of the Celestial
28020 * Intermediate Pole with respect to the International Terrestrial
28021 * Reference System (see IERS Conventions 2003), measured along the
28022 * meridians 0 and 90 deg west respectively. For many
28023 * applications, xp and yp can be set to zero.
28024 *
28025 * <li> If hm, the height above the ellipsoid of the observing station
28026 * in meters, is not known but phpa, the pressure in hPa (=mB), is
28027 * available, an adequate estimate of hm can be obtained from the
28028 * expression
28029 *
28030 * <p>hm = -29.3 * tsl * log ( phpa / 1013.25 );
28031 *
28032 * <p>where tsl is the approximate sea-level air temperature in K
28033 * (See Astrophysical Quantities, C.W.Allen, 3rd edition, section
28034 * 52). Similarly, if the pressure phpa is not known, it can be
28035 * estimated from the height of the observing station, hm, as
28036 * follows:
28037 *
28038 * <p>phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) );
28039 *
28040 * <p>Note, however, that the refraction is nearly proportional to
28041 * the pressure and that an accurate phpa value is important for
28042 * precise work.
28043 *
28044 * <li> The argument wl specifies the observing wavelength in
28045 * micrometers. The transition from optical to radio is assumed to
28046 * occur at 100 micrometers (about 3000 GHz).
28047 *
28048 * <li> The accuracy of the result is limited by the corrections for
28049 * refraction, which use a simple A*tan(z) + B*tan^3(z) model.
28050 * Providing the meteorological parameters are known accurately and
28051 * there are no gross local effects, the predicted astrometric
28052 * coordinates should be within 0.05 arcsec (optical) or 1 arcsec
28053 * (radio) for a zenith distance of less than 70 degrees, better
28054 * than 30 arcsec (optical or radio) at 85 degrees and better
28055 * than 20 arcmin (optical) or 30 arcmin (radio) at the horizon.
28056 *
28057 * <p>Without refraction, the complementary functions iauAtco13 and
28058 * iauAtoc13 are self-consistent to better than 1 microarcsecond
28059 * all over the celestial sphere. With refraction included,
28060 * consistency falls off at high zenith distances, but is still
28061 * better than 0.05 arcsec at 85 degrees.
28062 *
28063 * <li> It is advisable to take great care with units, as even unlikely
28064 * values of the input parameters are accepted and processed in
28065 * accordance with the models used.
28066 *
28067 * </ol>
28068 * Called:
28069 * <ul>
28070 * <li>{@link #jauApco13} astrometry parameters, ICRS-observed
28071 * <li>{@link #jauAtoiq} quick observed to CIRS
28072 * <li>{@link #jauAticq} quick CIRS to ICRS
28073 *
28074 * </ul>
28075 *@version 2013 October 9
28076 *
28077 *@since JSOFA release 20131202
28078 *
28079 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
28080 * @throws JSOFAInternalError an internal error has occured
28081 * @throws JSOFAIllegalParameter
28082 */
28083 public static SphericalCoordinate jauAtoc13(String type, double ob1, double ob2,
28084 double utc1, double utc2, double dut1,
28085 double elong, double phi, double hm, double xp, double yp,
28086 double phpa, double tc, double rh, double wl
28087 ) throws JSOFAIllegalParameter, JSOFAInternalError
28088 {
28089 Astrom astrom = new Astrom();
28090 jauApco13(utc1, utc2, dut1, elong, phi, hm, xp, yp,
28091 phpa, tc, rh, wl, astrom);
28092
28093 /* Transform observed to CIRS. */
28094 SphericalCoordinate co = jauAtoiq(type, ob1, ob2, astrom);
28095
28096 /* Transform CIRS to ICRS. */
28097 SphericalCoordinate icrs = jauAticq(co.alpha, co.delta, astrom);
28098 return icrs;
28099
28100
28101 /* Finished. */
28102
28103
28104 }
28105
28106 /**
28107 * Observed place to CIRS. The caller supplies UTC, site coordinates,
28108 * ambient air conditions and observing wavelength.
28109 *
28110 *<p>This function is derived from the International Astronomical Union's
28111 * SOFA (Standards of Fundamental Astronomy) software collection.
28112 *
28113 *<p>Status: support function.
28114 *
28115 *<!-- Given: -->
28116 * @param type char[] type of coordinates - "R", "H" or "A" (Notes 1,2)
28117 * @param ob1 double observed Az, HA or RA (radians; Az is N=0,E=90)
28118 * @param ob2 double observed ZD or Dec (radians)
28119 * @param utc1 double UTC as a 2-part...
28120 * @param utc2 double ...quasi Julian Date (Notes 3,4)
28121 * @param dut1 double UT1-UTC (seconds, Note 5)
28122 * @param elong double longitude (radians, east +ve, Note 6)
28123 * @param phi double geodetic latitude (radians, Note 6)
28124 * @param hm double height above the ellipsoid (meters, Notes 6,8)
28125 * @param xp double polar motion coordinates (radians, Note 7)
28126 * @param yp double polar motion coordinates (radians, Note 7)
28127 * @param phpa double pressure at the observer (hPa = mB, Note 8)
28128 * @param tc double ambient temperature at the observer (deg C)
28129 * @param rh double relative humidity at the observer (range 0-1)
28130 * @param wl double wavelength (micrometers, Note 9)
28131 *
28132 *<!-- Returned:-->
28133 * @return ri double* <b>Returned</b> CIRS right ascension (CIO-based, radians)
28134 * di double* <b>Returned</b> CIRS declination (radians)
28135 *
28136 * @throws JSOFAInternalError an internal error has occured
28137 * @throws JSOFAIllegalParameter int status: <b>Returned</b> +1 = dubious year (Note 2)
28138 * 0 = <b>Returned</b> OK
28139 * -1 = <b>Returned</b> unacceptable date
28140 *
28141 *<p>Notes:
28142 * <ol>
28143 *
28144 * <li> "Observed" Az,ZD means the position that would be seen by a
28145 * perfect geodetically aligned theodolite. (Zenith distance is
28146 * used rather than altitude in order to reflect the fact that no
28147 * allowance is made for depression of the horizon.) This is
28148 * related to the observed HA,Dec via the standard rotation, using
28149 * the geodetic latitude (corrected for polar motion), while the
28150 * observed HA and RA are related simply through the Earth rotation
28151 * angle and the site longitude. "Observed" RA,Dec or HA,Dec thus
28152 * means the position that would be seen by a perfect equatorial
28153 * with its polar axis aligned to the Earth's axis of rotation.
28154 *
28155 * <li> Only the first character of the type argument is significant.
28156 * "R" or "r" indicates that ob1 and ob2 are the observed right
28157 * ascension and declination; "H" or "h" indicates that they are
28158 * hour angle (west +ve) and declination; anything else ("A" or
28159 * "a" is recommended) indicates that ob1 and ob2 are azimuth
28160 * (north zero, east 90 deg) and zenith distance.
28161 *
28162 * <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
28163 * convenient way between the two arguments, for example where utc1
28164 * is the Julian Day Number and utc2 is the fraction of a day.
28165 *
28166 * <p>However, JD cannot unambiguously represent UTC during a leap
28167 * second unless special measures are taken. The convention in the
28168 * present function is that the JD day represents UTC days whether
28169 * the length is 86399, 86400 or 86401 SI seconds.
28170 *
28171 * <p>Applications should use the function iauDtf2d to convert from
28172 * calendar date and time of day into 2-part quasi Julian Date, as
28173 * it implements the leap-second-ambiguity convention just
28174 * described.
28175 *
28176 * <li> The warning status "dubious year" flags UTCs that predate the
28177 * introduction of the time scale or that are too far in the
28178 * future to be trusted. See iauDat for further details.
28179 *
28180 * <li> UT1-UTC is tabulated in IERS bulletins. It increases by exactly
28181 * one second at the end of each positive UTC leap second,
28182 * introduced in order to keep UT1-UTC within +/- 0.9s. n.b. This
28183 * practice is under review, and in the future UT1-UTC may grow
28184 * essentially without limit.
28185 *
28186 * <li> The geographical coordinates are with respect to the WGS84
28187 * reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN: the
28188 * longitude required by the present function is east-positive
28189 * (i.e. right-handed), in accordance with geographical convention.
28190 *
28191 * <li> The polar motion xp,yp can be obtained from IERS bulletins. The
28192 * values are the coordinates (in radians) of the Celestial
28193 * Intermediate Pole with respect to the International Terrestrial
28194 * Reference System (see IERS Conventions 2003), measured along the
28195 * meridians 0 and 90 deg west respectively. For many
28196 * applications, xp and yp can be set to zero.
28197 *
28198 * <li> If hm, the height above the ellipsoid of the observing station
28199 * in meters, is not known but phpa, the pressure in hPa (=mB), is
28200 * available, an adequate estimate of hm can be obtained from the
28201 * expression
28202 *
28203 * <p>hm = -29.3 * tsl * log ( phpa / 1013.25 );
28204 *
28205 * <p>where tsl is the approximate sea-level air temperature in K
28206 * (See Astrophysical Quantities, C.W.Allen, 3rd edition, section
28207 * 52). Similarly, if the pressure phpa is not known, it can be
28208 * estimated from the height of the observing station, hm, as
28209 * follows:
28210 *
28211 * <p>phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) );
28212 *
28213 * <p>Note, however, that the refraction is nearly proportional to
28214 * the pressure and that an accurate phpa value is important for
28215 * precise work.
28216 *
28217 * <li> The argument wl specifies the observing wavelength in
28218 * micrometers. The transition from optical to radio is assumed to
28219 * occur at 100 micrometers (about 3000 GHz).
28220 *
28221 * <li> The accuracy of the result is limited by the corrections for
28222 * refraction, which use a simple A*tan(z) + B*tan^3(z) model.
28223 * Providing the meteorological parameters are known accurately and
28224 * there are no gross local effects, the predicted astrometric
28225 * coordinates should be within 0.05 arcsec (optical) or 1 arcsec
28226 * (radio) for a zenith distance of less than 70 degrees, better
28227 * than 30 arcsec (optical or radio) at 85 degrees and better
28228 * than 20 arcmin (optical) or 30 arcmin (radio) at the horizon.
28229 *
28230 * <p>Without refraction, the complementary functions iauAtio13 and
28231 * iauAtoi13 are self-consistent to better than 1 microarcsecond
28232 * all over the celestial sphere. With refraction included,
28233 * consistency falls off at high zenith distances, but is still
28234 * better than 0.05 arcsec at 85 degrees.
28235 *
28236 * <li> It is advisable to take great care with units, as even unlikely
28237 * values of the input parameters are accepted and processed in
28238 * accordance with the models used.
28239 *
28240 * </ol>
28241 * Called:
28242 * <ul>
28243 * <li>{@link #jauApio13} astrometry parameters, CIRS-observed, 2013
28244 * <li>{@link #jauAtoiq} quick observed to CIRS
28245 *
28246 * </ul>
28247 *@version 2013 October 9
28248 *
28249 *@since JSOFA release 20131202
28250 *
28251 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
28252 * @throws JSOFAInternalError an internal error has occured
28253 * @throws JSOFAIllegalParameter
28254 */
28255 public static SphericalCoordinate jauAtoi13(String type, double ob1, double ob2,
28256 double utc1, double utc2, double dut1,
28257 double elong, double phi, double hm, double xp, double yp,
28258 double phpa, double tc, double rh, double wl
28259 ) throws JSOFAIllegalParameter, JSOFAInternalError
28260 {
28261 Astrom astrom = new Astrom();
28262
28263
28264 /* Star-independent astrometry parameters for CIRS->observed. */
28265 jauApio13(utc1, utc2, dut1, elong, phi, hm, xp, yp,
28266 phpa, tc, rh, wl, astrom);
28267
28268 /* Transform observed to CIRS. */
28269 SphericalCoordinate co = jauAtoiq(type, ob1, ob2, astrom);
28270 return co;
28271
28272 /* Finished. */
28273
28274
28275 }
28276
28277 /**
28278 * Quick observed place to CIRS, given the star-independent astrometry
28279 * parameters.
28280 *
28281 * Use of this function is appropriate when efficiency is important and
28282 * where many star positions are all to be transformed for one date.
28283 * The star-independent astrometry parameters can be obtained by
28284 * calling iauApio[13] or iauApco[13].
28285 *
28286 *<p>Status: support function.
28287 *
28288 *<!-- Given: -->
28289 * @param type char[] type of coordinates: "R", "H" or "A" (Note 1)
28290 * @param ob1 double observed Az, HA or RA (radians; Az is N=0,E=90)
28291 * @param ob2 double observed ZD or Dec (radians)
28292 * @param astrom star-independent astrometry parameters:
28293 *
28294 *<!-- Returned:-->
28295 * @return ri double* <b>Returned</b> CIRS right ascension (CIO-based, radians)
28296 * di double* <b>Returned</b> CIRS declination (radians)
28297 *
28298 *<p>Notes:
28299 * <ol>
28300 *
28301 * <li> "Observed" Az,El means the position that would be seen by a
28302 * perfect geodetically aligned theodolite. This is related to
28303 * the observed HA,Dec via the standard rotation, using the geodetic
28304 * latitude (corrected for polar motion), while the observed HA and
28305 * RA are related simply through the Earth rotation angle and the
28306 * site longitude. "Observed" RA,Dec or HA,Dec thus means the
28307 * position that would be seen by a perfect equatorial with its
28308 * polar axis aligned to the Earth's axis of rotation. By removing
28309 * from the observed place the effects of atmospheric refraction and
28310 * diurnal aberration, the CIRS RA,Dec is obtained.
28311 *
28312 * <li> Only the first character of the type argument is significant.
28313 * "R" or "r" indicates that ob1 and ob2 are the observed right
28314 * ascension and declination; "H" or "h" indicates that they are
28315 * hour angle (west +ve) and declination; anything else ("A" or
28316 * "a" is recommended) indicates that ob1 and ob2 are azimuth (north
28317 * zero, east 90 deg) and zenith distance. (Zenith distance is used
28318 * rather than altitude in order to reflect the fact that no
28319 * allowance is made for depression of the horizon.)
28320 *
28321 * <li> The accuracy of the result is limited by the corrections for
28322 * refraction, which use a simple A*tan(z) + B*tan^3(z) model.
28323 * Providing the meteorological parameters are known accurately and
28324 * there are no gross local effects, the predicted observed
28325 * coordinates should be within 0.05 arcsec (optical) or 1 arcsec
28326 * (radio) for a zenith distance of less than 70 degrees, better
28327 * than 30 arcsec (optical or radio) at 85 degrees and better than
28328 * 20 arcmin (optical) or 30 arcmin (radio) at the horizon.
28329 *
28330 * <p>Without refraction, the complementary functions iauAtioq and
28331 * iauAtoiq are self-consistent to better than 1 microarcsecond all
28332 * over the celestial sphere. With refraction included, consistency
28333 * falls off at high zenith distances, but is still better than
28334 * 0.05 arcsec at 85 degrees.
28335 *
28336 * <li> It is advisable to take great care with units, as even unlikely
28337 * values of the input parameters are accepted and processed in
28338 * accordance with the models used.
28339 *
28340 * </ol>
28341 * Called:
28342 * <ul>
28343 * <li>{@link #jauS2c} spherical coordinates to unit vector
28344 * <li>{@link #jauC2s} p-vector to spherical
28345 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
28346 *
28347 * </ul>
28348 *@version 2013 October 9
28349 *
28350 *@since JSOFA release 20131202
28351 *
28352 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
28353 */
28354 public static SphericalCoordinate jauAtoiq(String type,
28355 double ob1, double ob2, Astrom astrom
28356 )
28357 {
28358 char c;
28359 double c1, c2, sphi, cphi, ce, xaeo, yaeo, zaeo, v[] = new double[3],
28360 xmhdo, ymhdo, zmhdo, az, sz, zdo, refa, refb, tz, dref,
28361 zdt, xaet, yaet, zaet, xmhda, ymhda, zmhda,
28362 f, xhd, yhd, zhd, xpl, ypl, w;
28363
28364
28365 /* Coordinate type. */
28366 c = type.charAt(0);
28367
28368 /* Coordinates. */
28369 c1 = ob1;
28370 c2 = ob2;
28371
28372 /* Sin, cos of latitude. */
28373 sphi = astrom.sphi;
28374 cphi = astrom.cphi;
28375
28376 /* Standardize coordinate type. */
28377 if ( c == 'r' || c == 'R' ) {
28378 c = 'R';
28379 } else if ( c == 'h' || c == 'H' ) {
28380 c = 'H';
28381 } else {
28382 c = 'A';
28383 }
28384
28385 /* If Az,ZD, convert to Cartesian (S=0,E=90). */
28386 if ( c == 'A' ) {
28387 ce = sin(c2);
28388 xaeo = - cos(c1) * ce;
28389 yaeo = sin(c1) * ce;
28390 zaeo = cos(c2);
28391
28392 } else {
28393
28394 /* If RA,Dec, convert to HA,Dec. */
28395 if ( c == 'R' ) c1 = astrom.eral - c1;
28396
28397 /* To Cartesian -HA,Dec. */
28398 v = jauS2c ( -c1, c2 );
28399 xmhdo = v[0];
28400 ymhdo = v[1];
28401 zmhdo = v[2];
28402
28403 /* To Cartesian Az,El (S=0,E=90). */
28404 xaeo = sphi*xmhdo - cphi*zmhdo;
28405 yaeo = ymhdo;
28406 zaeo = cphi*xmhdo + sphi*zmhdo;
28407 }
28408
28409 /* Azimuth (S=0,E=90). */
28410 az = ( xaeo != 0.0 || yaeo != 0.0 ) ? atan2(yaeo,xaeo) : 0.0;
28411
28412 /* Sine of observed ZD, and observed ZD. */
28413 sz = sqrt ( xaeo*xaeo + yaeo*yaeo );
28414 zdo = atan2 ( sz, zaeo );
28415
28416 /*
28417 * Refraction
28418 * ----------
28419 */
28420
28421 /* Fast algorithm using two constant model. */
28422 refa = astrom.refa;
28423 refb = astrom.refb;
28424 tz = sz / zaeo;
28425 dref = ( refa + refb*tz*tz ) * tz;
28426 zdt = zdo + dref;
28427
28428 /* To Cartesian Az,ZD. */
28429 ce = sin(zdt);
28430 xaet = cos(az) * ce;
28431 yaet = sin(az) * ce;
28432 zaet = cos(zdt);
28433
28434 /* Cartesian Az,ZD to Cartesian -HA,Dec. */
28435 xmhda = sphi*xaet + cphi*zaet;
28436 ymhda = yaet;
28437 zmhda = - cphi*xaet + sphi*zaet;
28438
28439 /* Diurnal aberration. */
28440 f = ( 1.0 + astrom.diurab*ymhda );
28441 xhd = f * xmhda;
28442 yhd = f * ( ymhda - astrom.diurab );
28443 zhd = f * zmhda;
28444
28445 /* Polar motion. */
28446 xpl = astrom.xpl;
28447 ypl = astrom.ypl;
28448 w = xpl*xhd - ypl*yhd + zhd;
28449 v[0] = xhd - xpl*w;
28450 v[1] = yhd + ypl*w;
28451 v[2] = w - ( xpl*xpl + ypl*ypl ) * zhd;
28452
28453 /* To spherical -HA,Dec. */
28454 SphericalCoordinate co = jauC2s(v);
28455
28456 /* Right ascension. */
28457 co.alpha = jauAnp(astrom.eral + co.alpha);
28458
28459 return co;
28460 /* Finished. */
28461
28462
28463 }
28464
28465 /**
28466 * Apply light deflection by a solar-system body, as part of
28467 * transforming coordinate direction into natural direction.
28468 *
28469 *<p>This function is derived from the International Astronomical Union's
28470 * SOFA (Standards of Fundamental Astronomy) software collection.
28471 *
28472 *<p>Status: support function.
28473 *
28474 *<!-- Given: -->
28475 * @param bm double mass of the gravitating body (solar masses)
28476 * @param p double[3] direction from observer to source (unit vector)
28477 * @param q double[3] direction from body to source (unit vector)
28478 * @param e double[3] direction from body to observer (unit vector)
28479 * @param em double distance from body to observer (au)
28480 * @param dlim double deflection limiter (Note 4)
28481 *
28482 *<!-- Returned:-->
28483 * @return p1 double[3] <b>Returned</b> observer to deflected source (unit vector)
28484 *
28485 *<p>Notes:
28486 * <ol>
28487 *
28488 * <li> The algorithm is based on Expr. (70) in Klioner (2003) and
28489 * Expr. (7.63) in the Explanatory Supplement (Urban & Seidelmann
28490 * 2013), with some rearrangement to minimize the effects of machine
28491 * precision.
28492 *
28493 * <li> The mass parameter bm can, as required, be adjusted in order to
28494 * allow for such effects as quadrupole field.
28495 *
28496 * <li> The barycentric position of the deflecting body should ideally
28497 * correspond to the time of closest approach of the light ray to
28498 * the body.
28499 *
28500 * <li> The deflection limiter parameter dlim is phi^2/2, where phi is
28501 * the angular separation (in radians) between source and body at
28502 * which limiting is applied. As phi shrinks below the chosen
28503 * threshold, the deflection is artificially reduced, reaching zero
28504 * for phi = 0.
28505 *
28506 * <li> The returned vector p1 is not normalized, but the consequential
28507 * departure from unit magnitude is always negligible.
28508 *
28509 * <li> The arguments p and p1 can be the same array.
28510 *
28511 * <li> To accumulate total light deflection taking into account the
28512 * contributions from several bodies, call the present function for
28513 * each body in succession, in decreasing order of distance from the
28514 * observer.
28515 *
28516 * <li> For efficiency, validation is omitted. The supplied vectors must
28517 * be of unit magnitude, and the deflection limiter non-zero and
28518 * positive.
28519 *
28520 * </ol>
28521 *<p>References:
28522 * <ul>
28523 *
28524 * <li> Urban, S. & Seidelmann, P. K. (eds), Explanatory Supplement to
28525 * the Astronomical Almanac, 3rd ed., University Science Books
28526 * (2013).
28527 *
28528 * <li> Klioner, Sergei A., "A practical relativistic model for micro-
28529 * arcsecond astrometry in space", Astr. J. 125, 1580-1597 (2003).
28530 *
28531 * </ul>
28532 * Called:
28533 * <ul>
28534 * <li>{@link #jauPdp} scalar product of two p-vectors
28535 * <li>{@link #jauPxp} vector product of two p-vectors
28536 *
28537 * </ul>
28538 *@version 2013 October 9
28539 *
28540 *@since JSOFA release 20131202
28541 *
28542 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
28543 */
28544 public static double[] jauLd(double bm, double p[], double q[], double e[],
28545 double em, double dlim)
28546 {
28547 int i;
28548 double qpe[] = new double[3], qdqpe, w, eq[], peq[] ;
28549
28550 double p1[] = new double[3];
28551
28552 /* q . (q + e). */
28553 for (i = 0; i < 3; i++) {
28554 qpe[i] = q[i] + e[i];
28555 }
28556 qdqpe = jauPdp(q, qpe);
28557
28558 /* 2 x G x bm / ( em x c^2 x ( q . (q + e) ) ). */
28559 w = bm * SRS / em / max(qdqpe,dlim);
28560
28561 /* p x (e x q). */
28562 eq = jauPxp(e, q);
28563 peq = jauPxp(p, eq);
28564
28565 /* Apply the deflection. */
28566 for (i = 0; i < 3; i++) {
28567 p1[i] = p[i] + w*peq[i];
28568 }
28569
28570 return p1;
28571 /* Finished. */
28572
28573
28574 }
28575
28576 /*+
28577 * - - - - - - -
28578 * i a u L d n
28579 * - - - - - - -
28580 *
28581 * For a star, apply light deflection by multiple solar-system bodies,
28582 * as part of transforming coordinate direction into natural direction.
28583 *
28584 *<p>This function is derived from the International Astronomical Union's
28585 * SOFA (Standards of Fundamental Astronomy) software collection.
28586 *
28587 *<p>Status: support function.
28588 *
28589 *<!-- Given: -->
28590 * n int number of bodies (note 1)
28591 * b jauLDBODY[n] data for each of the n bodies (Notes 1,2):
28592 * bm double mass of the body (solar masses, Note 3)
28593 * dl double deflection limiter (Note 4)
28594 * pv [2][3] barycentric PV of the body (au, au/day)
28595 * ob double[3] barycentric position of the observer (au)
28596 * sc double[3] observer to star coord direction (unit vector)
28597 *
28598 *<!-- Returned:-->
28599 * sn double[3] observer to deflected star (unit vector)
28600 *
28601 * <li> The array b contains n entries, one for each body to be
28602 * considered. If n = 0, no gravitational light deflection will be
28603 * applied, not even for the Sun.
28604 *
28605 * <li> The array b should include an entry for the Sun as well as for
28606 * any planet or other body to be taken into account. The entries
28607 * should be in the order in which the light passes the body.
28608 *
28609 * <li> In the entry in the b array for body i, the mass parameter
28610 * b[i].bm can, as required, be adjusted in order to allow for such
28611 * effects as quadrupole field.
28612 *
28613 * <li> The deflection limiter parameter b[i].dl is phi^2/2, where phi is
28614 * the angular separation (in radians) between star and body at
28615 * which limiting is applied. As phi shrinks below the chosen
28616 * threshold, the deflection is artificially reduced, reaching zero
28617 * for phi = 0. Example values suitable for a terrestrial
28618 * observer, together with masses, are as follows:
28619 *
28620 * body i b[i].bm b[i].dl
28621 *
28622 * Sun 1.0 6e-6
28623 * Jupiter 0.00095435 3e-9
28624 * Saturn 0.00028574 3e-10
28625 *
28626 * <li> For cases where the starlight passes the body before reaching the
28627 * observer, the body is placed back along its barycentric track by
28628 * the light time from that point to the observer. For cases where
28629 * the body is "behind" the observer no such shift is applied. If
28630 * a different treatment is preferred, the user has the option of
28631 * instead using the iauLd function. Similarly, iauLd can be used
28632 * for cases where the source is nearby, not a star.
28633 *
28634 * <li> The returned vector sn is not normalized, but the consequential
28635 * departure from unit magnitude is always negligible.
28636 *
28637 * <li> The arguments sc and sn can be the same array.
28638 *
28639 * <li> For efficiency, validation is omitted. The supplied masses must
28640 * be greater than zero, the position and velocity vectors must be
28641 * right, and the deflection limiter greater than zero.
28642 *
28643 * Reference:
28644 *
28645 * Urban, S. & Seidelmann, P. K. (eds), Explanatory Supplement to
28646 * the Astronomical Almanac, 3rd ed., University Science Books
28647 * (2013), Section 7.2.4.
28648 *
28649 * Called:
28650 * iauCp copy p-vector
28651 * iauPdp scalar product of two p-vectors
28652 * iauPmp p-vector minus p-vector
28653 * iauPpsp p-vector plus scaled p-vector
28654 * iauPn decompose p-vector into modulus and direction
28655 * iauLd light deflection by a solar-system body
28656 *
28657 *@version 2013 October 9
28658 *
28659 *@since JSOFA release 20131202
28660 *
28661 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
28662 */
28663 public static double[] jauLdn(int n, Ldbody b[], double ob[], double sc[])
28664 {
28665 /* Light time for 1 au (days) */
28666 final double CR = AULT/DAYSEC;
28667
28668 int i;
28669 double v[] , dt, ev[], sn[] = new double[3];
28670
28671
28672 /* Star direction prior to deflection. */
28673 jauCp(sc, sn);
28674
28675 /* Body by body. */
28676 for ( i = 0; i < n; i++ ) {
28677
28678 /* Body to observer vector at epoch of observation (au). */
28679 v = jauPmp( ob, b[i].pv[0]);
28680
28681 /* Minus the time since the light passed the body (days). */
28682 dt = jauPdp(sn,v) * CR;
28683
28684 /* Neutralize if the star is "behind" the observer. */
28685 dt = min(dt, 0.0);
28686
28687 /* Backtrack the body to the time the light was passing the body. */
28688 ev = jauPpsp(v, -dt, b[i].pv[1]);
28689
28690 /* Body to observer vector as magnitude and direction. */
28691 NormalizedVector nv = jauPn(ev);
28692
28693 /* Apply light deflection for this body. */
28694 sn = jauLd( b[i].bm, sn, sn, nv.u, nv.r, b[i].dl );
28695
28696 /* Next body. */
28697 }
28698 return sn;
28699
28700 /* Finished. */
28701
28702
28703 }
28704
28705 /**
28706 * Deflection of starlight by the Sun.
28707 *
28708 *<p>This function is derived from the International Astronomical Union's
28709 * SOFA (Standards of Fundamental Astronomy) software collection.
28710 *
28711 *<p>Status: support function.
28712 *
28713 *<!-- Given: -->
28714 * @param p double[3] direction from observer to star (unit vector)
28715 * @param e double[3] direction from Sun to observer (unit vector)
28716 * @param em double distance from Sun to observer (au)
28717 *
28718 *<!-- Returned:-->
28719 * @return p1 double[3] <b>Returned</b> observer to deflected start (unit vector)
28720 *
28721 *<p>Notes:
28722 * <ol>
28723 *
28724 * <li> The source is presumed to be sufficiently distant that its
28725 * directions seen from the Sun and the observer are essentially
28726 * the same.
28727 *
28728 * <li> The deflection is restrained when the angle between the star and
28729 * the center of the Sun is less than a threshold value, falling to
28730 * zero deflection for zero separation. The chosen threshold value
28731 * is within the solar limb for all solar-system applications, and
28732 * is about 5 arcminutes for the case of a terrestrial observer.
28733 *
28734 * <li> The arguments p and p1 can be the same array.
28735 *
28736 * </ol>
28737 * Called:
28738 * <ul>
28739 * <li>{@link #jauLd} light deflection by a solar-system body
28740 *
28741 * </ul>
28742 *@version 2016 July 29
28743 *
28744 *@since JSOFA release 20131202
28745 *
28746 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
28747 */
28748 public static double[] jauLdsun(double p[], double e[], double em)
28749 {
28750 double em2, dlim;
28751
28752
28753 /* Deflection limiter (smaller for distant observers). */
28754 em2 = em*em;
28755 if ( em2 < 1.0 ) em2 = 1.0;
28756 dlim = 1e-6 / (em2 > 1.0 ? em2 : 1.0);
28757
28758 /* Apply the deflection. */
28759 return jauLd(1.0, p, p, e, em, dlim);
28760
28761 }
28762
28763 /**
28764 * Proper motion and parallax.
28765 *
28766 *<p>This function is derived from the International Astronomical Union's
28767 * SOFA (Standards of Fundamental Astronomy) software collection.
28768 *
28769 *<p>Status: support function.
28770 *
28771 *<!-- Given: -->
28772 * @param rc double ICRS RA,Dec at catalog epoch (radians)
28773 * @param dc double ICRS RA,Dec at catalog epoch (radians)
28774 * @param pr double RA proper motion (radians/year; Note 1)
28775 * @param pd double Dec proper motion (radians/year)
28776 * @param px double parallax (arcsec)
28777 * @param rv double radial velocity (km/s, +ve if receding)
28778 * @param pmt double proper motion time interval (SSB, Julian years)
28779 * @param pob double[3] SSB to observer vector (au)
28780 *
28781 *<!-- Returned:-->
28782 * @return pco double[3] <b>Returned</b> coordinate direction (BCRS unit vector)
28783 *
28784 *<p>Notes:
28785 * <ol>
28786 *
28787 * <li> The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
28788 *
28789 * <li> The proper motion time interval is for when the starlight
28790 * reaches the solar system barycenter.
28791 *
28792 * <li> To avoid the need for iteration, the Roemer effect (i.e. the
28793 * small annual modulation of the proper motion coming from the
28794 * changing light time) is applied approximately, using the
28795 * direction of the star at the catalog epoch.
28796 *
28797 * </ol>
28798 *<p>References:
28799 * <ul>
28800 *
28801 * <li> 1984 Astronomical Almanac, pp B39-B41.
28802 *
28803 * <li> Urban, S. & Seidelmann, P. K. (eds), Explanatory Supplement to
28804 * the Astronomical Almanac, 3rd ed., University Science Books
28805 * (2013), Section 7.2.
28806 *
28807 * </ul>
28808 * Called:
28809 * <ul>
28810 * <li>{@link #jauPdp} scalar product of two p-vectors
28811 * <li>{@link #jauPn} decompose p-vector into modulus and direction
28812 *
28813 * </ul>
28814 *@version 2013 October 9
28815 *
28816 *@since JSOFA release 20131202
28817 *
28818 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
28819 */
28820 public static double[] jauPmpx(double rc, double dc, double pr, double pd,
28821 double px, double rv, double pmt, double pob[]
28822 )
28823 {
28824 /* Km/s to au/year */
28825 final double VF = DAYSEC*DJM/DAU;
28826
28827 /* Light time for 1 au, Julian years */
28828 final double AULTY = AULT/DAYSEC/DJY;
28829
28830 int i;
28831 double sr, cr, sd, cd, x, y, z, p[] = new double[3], dt, pxr, w, pdz, pm[] = new double[3];
28832
28833
28834 /* Spherical coordinates to unit vector (and useful functions). */
28835 sr = sin(rc);
28836 cr = cos(rc);
28837 sd = sin(dc);
28838 cd = cos(dc);
28839 p[0] = x = cr*cd;
28840 p[1] = y = sr*cd;
28841 p[2] = z = sd;
28842
28843 /* Proper motion time interval (y) including Roemer effect. */
28844 dt = pmt + jauPdp(p,pob)*AULTY;
28845
28846 /* Space motion (radians per year). */
28847 pxr = px * DAS2R;
28848 w = VF * rv * pxr;
28849 pdz = pd * z;
28850 pm[0] = - pr*y - pdz*cr + w*x;
28851 pm[1] = pr*x - pdz*sr + w*y;
28852 pm[2] = pd*cd + w*z;
28853
28854 /* Coordinate direction of star (unit vector, BCRS). */
28855 for (i = 0; i < 3; i++) {
28856 p[i] += dt*pm[i] - pxr*pob[i];
28857 }
28858 NormalizedVector pco = jauPn(p);
28859
28860 return pco.u;
28861 /* Finished. */
28862
28863
28864 }
28865
28866 /**
28867 * Star proper motion: update star catalog data for space motion, with
28868 * special handling to handle the zero parallax case.
28869 *
28870 *<p>This function is derived from the International Astronomical Union's
28871 * SOFA (Standards of Fundamental Astronomy) software collection.
28872 *
28873 *<p>Status: support function.
28874 *
28875 *<!-- Given: -->
28876 * @param ra1 double right ascension (radians), before
28877 * @param dec1 double declination (radians), before
28878 * @param pmr1 double RA proper motion (radians/year), before
28879 * @param pmd1 double Dec proper motion (radians/year), before
28880 * @param px1 double parallax (arcseconds), before
28881 * @param rv1 double radial velocity (km/s, +ve = receding), before
28882 * @param ep1a double "before" epoch, part A (Note 1)
28883 * @param ep1b double "before" epoch, part B (Note 1)
28884 * @param ep2a double "after" epoch, part A (Note 1)
28885 * @param ep2b double "after" epoch, part B (Note 1)
28886 *
28887 *<!-- Returned:-->
28888 * @return ra2 double <b>Returned</b> right ascension (radians), after
28889 * dec2 double <b>Returned</b> declination (radians), after
28890 * pmr2 double <b>Returned</b> RA proper motion (radians/year), after
28891 * pmd2 double <b>Returned</b> Dec proper motion (radians/year), after
28892 * px2 double <b>Returned</b> parallax (arcseconds), after
28893 * rv2 double <b>Returned</b> radial velocity (km/s, +ve = receding), after
28894 *
28895 *
28896 * @throws JSOFAInternalError int status:
28897 * -1 = <b>Returned</b> system error (should not occur)
28898 * 0 = <b>Returned</b> no warnings or errors
28899 * 1 = <b>Returned</b> distance overridden (Note 6)
28900 * 2 = <b>Returned</b> excessive velocity (Note 7)
28901 * 4 = <b>Returned</b> solution didn't converge (Note 8)
28902 * else = <b>Returned</b> binary logical OR of the above warnings
28903 *
28904 *<p>Notes:
28905 * <ol>
28906 *
28907 * <li> The starting and ending TDB epochs ep1a+ep1b and ep2a+ep2b are
28908 * Julian Dates, apportioned in any convenient way between the two
28909 * parts (A and B). For example, JD(TDB)=2450123.7 could be
28910 * expressed in any of these ways, among others:
28911 *
28912 * <p>epNa epNb
28913 *
28914 * 2450123.7 0.0 (JD method)
28915 * 2451545.0 -1421.3 (J2000 method)
28916 * 2400000.5 50123.2 (MJD method)
28917 * 2450123.5 0.2 (date & time method)
28918 *
28919 * <p>The JD method is the most natural and convenient to use in cases
28920 * where the loss of several decimal digits of resolution is
28921 * acceptable. The J2000 method is best matched to the way the
28922 * argument is handled internally and will deliver the optimum
28923 * resolution. The MJD method and the date & time methods are both
28924 * good compromises between resolution and convenience.
28925 *
28926 * <li> In accordance with normal star-catalog conventions, the object's
28927 * right ascension and declination are freed from the effects of
28928 * secular aberration. The frame, which is aligned to the catalog
28929 * equator and equinox, is Lorentzian and centered on the SSB.
28930 *
28931 * <p>The proper motions are the rate of change of the right ascension
28932 * and declination at the catalog epoch and are in radians per TDB
28933 * Julian year.
28934 *
28935 * <p>The parallax and radial velocity are in the same frame.
28936 *
28937 * <li> Care is needed with units. The star coordinates are in radians
28938 * and the proper motions in radians per Julian year, but the
28939 * parallax is in arcseconds.
28940 *
28941 * <li> The RA proper motion is in terms of coordinate angle, not true
28942 * angle. If the catalog uses arcseconds for both RA and Dec proper
28943 * motions, the RA proper motion will need to be divided by cos(Dec)
28944 * before use.
28945 *
28946 * <li> Straight-line motion at constant speed, in the inertial frame, is
28947 * assumed.
28948 *
28949 * <li> An extremely small (or zero or negative) parallax is overridden
28950 * to ensure that the object is at a finite but very large distance,
28951 * but not so large that the proper motion is equivalent to a large
28952 * but safe speed (about 0.1c using the chosen constant). A warning
28953 * status of 1 is added to the status if this action has been taken.
28954 *
28955 * <li> If the space velocity is a significant fraction of c (see the
28956 * constant VMAX in the function iauStarpv), it is arbitrarily set
28957 * to zero. When this action occurs, 2 is added to the status.
28958 *
28959 * <li> The relativistic adjustment carried out in the iauStarpv function
28960 * involves an iterative calculation. If the process fails to
28961 * converge within a set number of iterations, 4 is added to the
28962 * status.
28963 *
28964 * </ol>
28965 * Called:
28966 * <ul>
28967 * <li>{@link #jauSeps} angle between two points
28968 * <li>{@link #jauStarpm} update star catalog data for space motion
28969 *
28970 * </ul>
28971 *@version 2013 October 9
28972 *
28973 *@since JSOFA release 20131202
28974 *
28975 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
28976 * @throws JSOFAInternalError an internal error has occured
28977 */
28978 public static CatalogCoords jauPmsafe(double ra1, double dec1, double pmr1, double pmd1,
28979 double px1, double rv1,
28980 double ep1a, double ep1b, double ep2a, double ep2b) throws JSOFAInternalError
28981 {
28982
28983 /* Minimum allowed parallax (arcsec) */
28984 final double PXMIN = 5e-7;
28985
28986 /* Factor giving maximum allowed transverse speed of about 1% c */
28987 final double F = 326.0;
28988
28989 double pm, px1a;
28990
28991
28992 /* Proper motion in one year (radians). */
28993 pm = jauSeps(ra1, dec1, ra1+pmr1, dec1+pmd1);
28994
28995
28996 px1a = px1;
28997 pm *= F;
28998 if (px1a < pm) {px1a = pm;}
28999 if (px1a < PXMIN) {px1a = PXMIN;}
29000
29001 /* Carry out the transformation using the modified parallax. */
29002 return jauStarpm(ra1, dec1, pmr1, pmd1, px1a, rv1,
29003 ep1a, ep1b, ep2a, ep2b);
29004
29005 /* Finished. */
29006
29007
29008 }
29009
29010 /**
29011 * Position and velocity of a terrestrial observing station.
29012 *
29013 *<p>This function is derived from the International Astronomical Union's
29014 * SOFA (Standards of Fundamental Astronomy) software collection.
29015 *
29016 *<p>Status: support function.
29017 *
29018 *<!-- Given: -->
29019 * @param elong double longitude (radians, east +ve, Note 1)
29020 * @param phi double latitude (geodetic, radians, Note 1)
29021 * @param hm double height above ref. ellipsoid (geodetic, m)
29022 * @param xp double coordinates of the pole (radians, Note 2)
29023 * @param yp double coordinates of the pole (radians, Note 2)
29024 * @param sp double the TIO locator s' (radians, Note 2)
29025 * @param theta double Earth rotation angle (radians, Note 3)
29026 *
29027 *<!-- Returned:-->
29028 * @return pv double[2][3] <b>Returned</b> position/velocity vector (m, m/s, CIRS)
29029 *
29030 *<p>Notes:
29031 * <ol>
29032 *
29033 * <li> The terrestrial coordinates are with respect to the WGS84
29034 * reference ellipsoid.
29035 *
29036 * <li> xp and yp are the coordinates (in radians) of the Celestial
29037 * Intermediate Pole with respect to the International Terrestrial
29038 * Reference System (see IERS Conventions), measured along the
29039 * meridians 0 and 90 deg west respectively. sp is the TIO locator
29040 * s', in radians, which positions the Terrestrial Intermediate
29041 * Origin on the equator. For many applications, xp, yp and
29042 * (especially) sp can be set to zero.
29043 *
29044 * <li> If theta is Greenwich apparent sidereal time instead of Earth
29045 * rotation angle, the result is with respect to the true equator
29046 * and equinox of date, i.e. with the x-axis at the equinox rather
29047 * than the celestial intermediate origin.
29048 *
29049 * <li> The velocity units are meters per UT1 second, not per SI second.
29050 * This is unlikely to have any practical consequences in the modern
29051 * era.
29052 *
29053 * <li> No validation is performed on the arguments. Error cases that
29054 * could lead to arithmetic exceptions are trapped by the iauGd2gc
29055 * function, and the result set to zeros.
29056 *
29057 * </ol>
29058 *<p>References:
29059 * <ul>
29060 *
29061 * <li> McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
29062 * IERS Technical Note No. 32, BKG (2004)
29063 *
29064 * <li> Urban, S. & Seidelmann, P. K. (eds), Explanatory Supplement to
29065 * the Astronomical Almanac, 3rd ed., University Science Books
29066 * (2013), Section 7.4.3.3.
29067 *
29068 * </ul>
29069 * Called:
29070 * <ul>
29071 * <li>{@link #jauGd2gc} geodetic to geocentric transformation
29072 * <li>{@link #jauPom00} polar motion matrix
29073 * <li>{@link #jauTrxp} product of transpose of r-matrix and p-vector
29074 *
29075 * </ul>
29076 *@version 2013 October 9
29077 *
29078 * @since JSOFA release 20131202
29079 *
29080 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
29081 * @throws JSOFAInternalError an internal error has occured
29082 * @throws JSOFAIllegalParameter
29083 */
29084 public static double [][] jauPvtob(double elong, double phi, double hm,
29085 double xp, double yp, double sp, double theta
29086 ) throws JSOFAIllegalParameter, JSOFAInternalError
29087 {
29088
29089 double xyzm[];
29090
29091 /* Geodetic to geocentric transformation (WGS84). */
29092 xyzm = jauGd2gc(1, elong, phi, hm);
29093
29094 return jauPvtob(xyzm, xp, yp, sp, theta );
29095 /* Finished. */
29096
29097
29098 }
29099
29100 /**
29101 * Alternative Position and velocity of a terrestrial observing station with observatory position already in cartesian.
29102 * @see JSOFA#jauPvtob(double, double, double, double, double, double, double) for more detail.
29103 * @param xyzm observatory geocentric position in metres.
29104 * @param xp double coordinates of the pole (radians, Note 2)
29105 * @param yp double coordinates of the pole (radians, Note 2)
29106 * @param sp double the TIO locator s' (radians, Note 2)
29107 * @param theta double Earth rotation angle (radians, Note 3)
29108 * @return pv double[2][3] <b>Returned</b> position/velocity vector (m, m/s, CIRS)
29109 * @throws JSOFAIllegalParameter
29110 * @throws JSOFAInternalError an internal error has occured
29111 */
29112 public static double [][] jauPvtob(double xyzm[],
29113 double xp, double yp, double sp, double theta
29114 ) throws JSOFAIllegalParameter, JSOFAInternalError
29115 {
29116 /* Earth rotation rate in radians per UT1 second */
29117 final double OM = 1.00273781191135448 * D2PI / DAYSEC;
29118
29119 double rpm[][], xyz[], x, y, z, s, c;
29120 double pv[][] = new double[2][3];
29121
29122
29123 /* Polar motion and TIO position. */
29124 rpm = jauPom00(xp, yp, sp);
29125 xyz = jauTrxp(rpm, xyzm);
29126 x = xyz[0];
29127 y = xyz[1];
29128 z = xyz[2];
29129
29130 /* Functions of ERA. */
29131 s = sin(theta);
29132 c = cos(theta);
29133
29134 /* Position. */
29135 pv[0][0] = c*x - s*y;
29136 pv[0][1] = s*x + c*y;
29137 pv[0][2] = z;
29138
29139 /* Velocity. */
29140 pv[1][0] = OM * ( -s*x - c*y );
29141 pv[1][1] = OM * ( c*x - s*y );
29142 pv[1][2] = 0.0;
29143
29144 return pv;
29145 /* Finished. */
29146
29147
29148 }
29149
29150 /**
29151 * constants A and B in the atmospheric refraction model
29152 * dZ = A tan Z + B tan^3 Z.
29153 * .
29154 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 28 Mar 2014
29155 * @version $Revision$ $date$
29156 */
29157 public static class RefCos {
29158 /** refraction coefficient A */
29159 public double a ;
29160
29161 /** refraction coefficient B */
29162 public double b ;
29163 public RefCos(double a, double b) {
29164 this.a = a;
29165 this.b = b;
29166 }
29167
29168 }
29169
29170 /**
29171 * Determine the constants A and B in the atmospheric refraction model
29172 * dZ = A tan Z + B tan^3 Z.
29173 *
29174 * Z is the "observed" zenith distance (i.e. affected by refraction)
29175 * and dZ is what to add to Z to give the "topocentric" (i.e. in vacuo)
29176 * zenith distance.
29177 *
29178 *<p>This function is derived from the International Astronomical Union's
29179 * SOFA (Standards of Fundamental Astronomy) software collection.
29180 *
29181 *<p>Status: support function.
29182 *
29183 *<!-- Given: -->
29184 * @param phpa double pressure at the observer (hPa = millibar)
29185 * @param tc double ambient temperature at the observer (deg C)
29186 * @param rh double relative humidity at the observer (range 0-1)
29187 * @param wl double wavelength (micrometers)
29188 *
29189 *<!-- Returned:-->
29190 * @return <b>Returned</b> tan Z coefficient (radians)
29191 * <b>Returned</b> tan^3 Z coefficient (radians)
29192 *
29193 *<p>Notes:
29194 * <ol>
29195 *
29196 * <li> The model balances speed and accuracy to give good results in
29197 * applications where performance at low altitudes is not paramount.
29198 * Performance is maintained across a range of conditions, and
29199 * applies to both optical/IR and radio.
29200 *
29201 * <li> The model omits the effects of (i) height above sea level (apart
29202 * from the reduced pressure itself), (ii) latitude (i.e. the
29203 * flattening of the Earth), (iii) variations in tropospheric lapse
29204 * rate and (iv) dispersive effects in the radio.
29205 *
29206 * <p>The model was tested using the following range of conditions:
29207 *
29208 * <p>lapse rates 0.0055, 0.0065, 0.0075 deg/meter
29209 * latitudes 0, 25, 50, 75 degrees
29210 * heights 0, 2500, 5000 meters ASL
29211 * pressures mean for height -10% to +5% in steps of 5%
29212 * temperatures -10 deg to +20 deg with respect to 280 deg at SL
29213 * relative humidity 0, 0.5, 1
29214 * wavelengths 0.4, 0.6, ... 2 micron, + radio
29215 * zenith distances 15, 45, 75 degrees
29216 *
29217 * <p>The accuracy with respect to raytracing through a model
29218 * atmosphere was as follows:
29219 *
29220 * <p>worst RMS
29221 *
29222 * <p>optical/IR 62 mas 8 mas
29223 * radio 319 mas 49 mas
29224 *
29225 * <p>For this particular set of conditions:
29226 *
29227 * <p>lapse rate 0.0065 K/meter
29228 * latitude 50 degrees
29229 * sea level
29230 * pressure 1005 mb
29231 * temperature 280.15 K
29232 * humidity 80%
29233 * wavelength 5740 Angstroms
29234 *
29235 * <p>the results were as follows:
29236 *
29237 * <p>ZD raytrace iauRefco Saastamoinen
29238 *
29239 * 10 10.27 10.27 10.27
29240 * 20 21.19 21.20 21.19
29241 * 30 33.61 33.61 33.60
29242 * 40 48.82 48.83 48.81
29243 * 45 58.16 58.18 58.16
29244 * 50 69.28 69.30 69.27
29245 * 55 82.97 82.99 82.95
29246 * 60 100.51 100.54 100.50
29247 * 65 124.23 124.26 124.20
29248 * 70 158.63 158.68 158.61
29249 * 72 177.32 177.37 177.31
29250 * 74 200.35 200.38 200.32
29251 * 76 229.45 229.43 229.42
29252 * 78 267.44 267.29 267.41
29253 * 80 319.13 318.55 319.10
29254 *
29255 * <p>deg arcsec arcsec arcsec
29256 *
29257 * <p>The values for Saastamoinen's formula (which includes terms
29258 * up to tan^5) are taken from Hohenkerk and Sinclair (1985).
29259 *
29260 * <li> A wl value in the range 0-100 selects the optical/IR case and is
29261 * wavelength in micrometers. Any value outside this range selects
29262 * the radio case.
29263 *
29264 * <li> Outlandish input parameters are silently limited to
29265 * mathematically safe values. Zero pressure is permissible, and
29266 * causes zeroes to be returned.
29267 *
29268 * <li> The algorithm draws on several sources, as follows:
29269 *
29270 * <p>a) The formula for the saturation vapour pressure of water as
29271 * a function of temperature and temperature is taken from
29272 * Equations (A4.5-A4.7) of Gill (1982).
29273 *
29274 * <p>b) The formula for the water vapour pressure, given the
29275 * saturation pressure and the relative humidity, is from
29276 * Crane (1976), Equation (2.5.5).
29277 *
29278 * <p>c) The refractivity of air is a function of temperature,
29279 * total pressure, water-vapour pressure and, in the case
29280 * of optical/IR, wavelength. The formulae for the two cases are
29281 * developed from Hohenkerk & Sinclair (1985) and Rueger (2002).
29282 *
29283 * <p>d) The formula for beta, the ratio of the scale height of the
29284 * atmosphere to the geocentric distance of the observer, is
29285 * an adaption of Equation (9) from Stone (1996). The
29286 * adaptations, arrived at empirically, consist of (i) a small
29287 * adjustment to the coefficient and (ii) a humidity term for the
29288 * radio case only.
29289 *
29290 * <p>e) The formulae for the refraction constants as a function of
29291 * n-1 and beta are from Green (1987), Equation (4.31).
29292 *
29293 * </ol>
29294 *<p>References:
29295 * <ul>
29296 *
29297 * <li> Crane, R.K., Meeks, M.L. (ed), "Refraction Effects in the Neutral
29298 * Atmosphere", Methods of Experimental Physics: Astrophysics 12B,
29299 * Academic Press, 1976.
29300 *
29301 * <li> Gill, Adrian E., "Atmosphere-Ocean Dynamics", Academic Press,
29302 * 1982.
29303 *
29304 * <li> Green, R.M., "Spherical Astronomy", Cambridge University Press,
29305 * 1987.
29306 *
29307 * <li> Hohenkerk, C.Y., & Sinclair, A.T., NAO Technical Note No. 63,
29308 * 1985.
29309 *
29310 * <li> Rueger, J.M., "Refractive Index Formulae for Electronic Distance
29311 * Measurement with Radio and Millimetre Waves", in Unisurv Report
29312 * S-68, School of Surveying and Spatial Information Systems,
29313 * University of New South Wales, Sydney, Australia, 2002.
29314 *
29315 * <li> Stone, Ronald C., P.A.S.P. 108, 1051-1058, 1996.
29316 *
29317 * </ul>
29318 *@version 2013 October 9
29319 *
29320 *@since JSOFA release 20131202
29321 *
29322 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
29323 */
29324 public static RefCos jauRefco(double phpa, double tc, double rh, double wl )
29325 {
29326 boolean optic;
29327 double p, t, r, w, ps, pw, tk, wlsq, gamma, beta;
29328
29329
29330 /* Decide whether optical/IR or radio case: switch at 100 microns. */
29331 optic = ( wl <= 100.0 );
29332
29333 /* Restrict parameters to safe values. */
29334 t = max ( tc, -150.0 );
29335 t = min ( t, 200.0 );
29336 p = max ( phpa, 0.0 );
29337 p = min ( p, 10000.0 );
29338 r = max ( rh, 0.0 );
29339 r = min ( r, 1.0 );
29340 w = max ( wl, 0.1 );
29341 w = min ( w, 1e6 );
29342
29343 /* Water vapour pressure at the observer. */
29344 if ( p > 0.0 ) {
29345 ps = pow ( 10.0, ( 0.7859 + 0.03477*t ) /
29346 ( 1.0 + 0.00412*t ) ) *
29347 ( 1.0 + p * ( 4.5e-6 + 6e-10*t*t ) );
29348 pw = r * ps / ( 1.0 - (1.0-r)*ps/p );
29349 } else {
29350 pw = 0.0;
29351 }
29352
29353 /* Refractive index minus 1 at the observer. */
29354 tk = t + 273.15;
29355 if ( optic ) {
29356 wlsq = w * w;
29357 gamma = ( ( 77.53484e-6 +
29358 ( 4.39108e-7 + 3.666e-9/wlsq ) / wlsq ) * p
29359 - 11.2684e-6*pw ) / tk;
29360 } else {
29361 gamma = ( 77.6890e-6*p - ( 6.3938e-6 - 0.375463/tk ) * pw ) / tk;
29362 }
29363
29364 /* Formula for beta from Stone, with empirical adjustments. */
29365 beta = 4.4474e-6 * tk;
29366 if ( ! optic ) beta -= 0.0074 * pw * beta;
29367
29368 /* Refraction constants from Green. */
29369 return new RefCos( gamma * ( 1.0 - beta ),
29370 - gamma * ( beta - gamma / 2.0 ));
29371
29372 /* Finished. */
29373
29374
29375 }
29376
29377
29378 /**
29379 * Transformation from Galactic Coordinates to ICRS.
29380 *
29381 * This function is derived from the International Astronomical Union's
29382 * SOFA (Standards of Fundamental Astronomy) software collection.
29383 *
29384 * <p>Status: support routine.
29385 *
29386 * @param dl double galactic longitude (radians)
29387 * @param db double galactic latitude (radians)
29388 *
29389 * @return co ICRS right ascension, declination.
29390 *
29391 * <p>Notes:<ol>
29392 *
29393 * <li> The IAU 1958 system of Galactic coordinates was defined with
29394 * respect to the now obsolete reference system FK4 B1950.0. When
29395 * interpreting the system in a modern context, several factors have
29396 * to be taken into account:<ul>
29397 *
29398 * <li> The inclusion in FK4 positions of the E-terms of aberration.
29399 *
29400 * <li> The distortion of the FK4 proper motion system by differential
29401 * Galactic rotation.
29402 *
29403 * <li> The use of the B1950.0 equinox rather than the now-standard
29404 * J2000.0.
29405 *
29406 * <li> The frame bias between ICRS and the J2000.0 mean place system.
29407 * </ul>
29408 * The Hipparcos Catalogue (Perryman & ESA 1997) provides a rotation
29409 * matrix that transforms directly between ICRS and Galactic
29410 * coordinates with the above factors taken into account. The
29411 * matrix is derived from three angles, namely the ICRS coordinates
29412 * of the Galactic pole and the longitude of the ascending node of
29413 * the galactic equator on the ICRS equator. They are given in
29414 * degrees to five decimal places and for canonical purposes are
29415 * regarded as exact. In the Hipparcos Catalogue the matrix
29416 * elements are given to 10 decimal places (about 20 microarcsec).
29417 * In the present SOFA function the matrix elements have been
29418 * recomputed from the canonical three angles and are given to 30
29419 * decimal places.
29420 *
29421 * <li> The inverse transformation is performed by the function jauIcrs2g.
29422 * </ol>
29423 *
29424 * Reference:
29425 * Perryman M.A.C. & ESA, 1997, ESA SP-1200, The Hipparcos and Tycho
29426 * catalogues. Astrometric and photometric star catalogues
29427 * derived from the ESA Hipparcos Space Astrometry Mission. ESA
29428 * Publications Division, Noordwijk, Netherlands.
29429 *
29430 * @version 2015 March 02
29431 *
29432 *
29433 * @since JSOFA release 20150209
29434 *
29435 */
29436 public static SphericalCoordinate jauG2icrs ( double dl, double db)
29437 {
29438 double v1[], v2[];
29439
29440 /*
29441 * L2,B2 system of galactic coordinates in the form presented in the
29442 * Hipparcos Catalogue. In degrees:
29443 *
29444 * P = 192.85948 right ascension of the Galactic north pole in ICRS
29445 * Q = 27.12825 declination of the Galactic north pole in ICRS
29446 * R = 32.93192 longitude of the ascending node of the Galactic
29447 * plane on the ICRS equator
29448 *
29449 * ICRS to galactic rotation matrix, obtained by computing
29450 * R_3(-R) R_1(pi/2-Q) R_3(pi/2+P) to the full precision shown:
29451 */
29452 double r[][] = new double[][]{ { -0.054875560416215368492398900454,
29453 -0.873437090234885048760383168409,
29454 -0.483835015548713226831774175116 },
29455 { +0.494109427875583673525222371358,
29456 -0.444829629960011178146614061616,
29457 +0.746982244497218890527388004556 },
29458 { -0.867666149019004701181616534570,
29459 -0.198076373431201528180486091412,
29460 +0.455983776175066922272100478348 } };
29461
29462
29463 /* Spherical to Cartesian. */
29464 v1 = jauS2c(dl, db);
29465
29466 /* Galactic to ICRS. */
29467 v2 = jauTrxp(r, v1);
29468
29469 /* Cartesian to spherical. */
29470 SphericalCoordinate co = jauC2s(v2);
29471
29472 /* Express in conventional ranges. */
29473 co.alpha = jauAnp(co.alpha);
29474 co.delta = jauAnpm(co.delta);
29475
29476 /* Finished. */
29477 return co;
29478 }
29479
29480
29481
29482 /**
29483 * Transformation from ICRS to Galactic Coordinates.
29484 *
29485 * This function is derived from the International Astronomical Union's
29486 * SOFA (Standards of Fundamental Astronomy) software collection.
29487 *
29488 * <p>Status: support routine.
29489 *
29490 * @param dr double ICRS right ascension (radians)
29491 * @param dd double ICRS declination (radians)
29492 *
29493 * @return co galactic longitude (radians), galactic latitude (radians)
29494 *
29495 * <p>Notes:<ol>
29496 *
29497 * <li> The IAU 1958 system of Galactic coordinates was defined with
29498 * respect to the now obsolete reference system FK4 B1950.0. When
29499 * interpreting the system in a modern context, several factors have
29500 * to be taken into account:<ul>
29501 *
29502 * <li> The inclusion in FK4 positions of the E-terms of aberration.
29503 *
29504 * <li> The distortion of the FK4 proper motion system by differential
29505 * Galactic rotation.
29506 *
29507 * <li> The use of the B1950.0 equinox rather than the now-standard
29508 * J2000.0.
29509 *
29510 * <li> The frame bias between ICRS and the J2000.0 mean place system.
29511 * </ul>
29512 * The Hipparcos Catalogue (Perryman & ESA 1997) provides a rotation
29513 * matrix that transforms directly between ICRS and Galactic
29514 * coordinates with the above factors taken into account. The
29515 * matrix is derived from three angles, namely the ICRS coordinates
29516 * of the Galactic pole and the longitude of the ascending node of
29517 * the galactic equator on the ICRS equator. They are given in
29518 * degrees to five decimal places and for canonical purposes are
29519 * regarded as exact. In the Hipparcos Catalogue the matrix
29520 * elements are given to 10 decimal places (about 20 microarcsec).
29521 * In the present SOFA function the matrix elements have been
29522 * recomputed from the canonical three angles and are given to 30
29523 * decimal places.
29524 *
29525 * <li> The inverse transformation is performed by the function iauG2icrs.
29526 * </ol>
29527 * Reference:
29528 * Perryman M.A.C. & ESA, 1997, ESA SP-1200, The Hipparcos and Tycho
29529 * catalogues. Astrometric and photometric star catalogues
29530 * derived from the ESA Hipparcos Space Astrometry Mission. ESA
29531 * Publications Division, Noordwijk, Netherlands.
29532 *
29533 * @version 2015 January 20
29534 *
29535 * @since JSOFA release 20150209
29536 *
29537 */
29538 public static SphericalCoordinate jauIcrs2g ( double dr, double dd )
29539 {
29540 double v1[], v2[];
29541
29542 /*
29543 * L2,B2 system of galactic coordinates in the form presented in the
29544 * Hipparcos Catalogue. In degrees:
29545 *
29546 * P = 192.85948 right ascension of the Galactic north pole in ICRS
29547 * Q = 27.12825 declination of the Galactic north pole in ICRS
29548 * R = 32.93192 longitude of the ascending node of the Galactic
29549 * plane on the ICRS equator
29550 *
29551 * ICRS to galactic rotation matrix, obtained by computing
29552 * R_3(-R) R_1(pi/2-Q) R_3(pi/2+P) to the full precision shown:
29553 */
29554 double r[][] = new double[][] { { -0.054875560416215368492398900454,
29555 -0.873437090234885048760383168409,
29556 -0.483835015548713226831774175116 },
29557 { +0.494109427875583673525222371358,
29558 -0.444829629960011178146614061616,
29559 +0.746982244497218890527388004556 },
29560 { -0.867666149019004701181616534570,
29561 -0.198076373431201528180486091412,
29562 +0.455983776175066922272100478348 } };
29563
29564
29565 /* Spherical to Cartesian. */
29566 v1 = jauS2c(dr, dd);
29567
29568 /* ICRS to Galactic. */
29569 v2 = jauRxp(r, v1);
29570
29571 /* Cartesian to spherical. */
29572 SphericalCoordinate co = jauC2s(v2);
29573
29574 /* Express in conventional ranges. */
29575 co.alpha = jauAnp(co.alpha);
29576 co.delta = jauAnpm(co.delta);
29577 return co;
29578 }
29579
29580 // 2016-05-03 additions below
29581
29582 /**
29583 *
29584 * Transformation from ecliptic coordinates (mean equinox and ecliptic
29585 * of date) to ICRS RA,Dec, using the IAU 2006 precession model.
29586 *
29587 * <p>This function is derived from the International Astronomical Union's
29588 * SOFA (Standards of Fundamental Astronomy) software collection.
29589 *
29590 * <p>Status: support function.
29591 *
29592 * <!-- Given: -->
29593 * @param date1 double TT as a 2-part Julian date (Note 1)
29594 * @param date2 double TT as a 2-part Julian date (Note 1)
29595 * @param dl double ecliptic longitude and latitude (radians)
29596 * @param db double ecliptic longitude and latitude (radians)
29597 *
29598 * <!-- Returned: -->
29599 * @return double ICRS right ascension and declination (radians)
29600 *
29601 *<ol>
29602 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
29603 * convenient way between the two arguments. For example,
29604 * JD(TT)=2450123.7 could be expressed in any of these ways,
29605 * among others:
29606 *
29607 * date1 date2
29608 *
29609 * 2450123.7 0.0 (JD method)
29610 * 2451545.0 -1421.3 (J2000 method)
29611 * 2400000.5 50123.2 (MJD method)
29612 * 2450123.5 0.2 (date & time method)
29613 *
29614 * The JD method is the most natural and convenient to use in
29615 * cases where the loss of several decimal digits of resolution
29616 * is acceptable. The J2000 method is best matched to the way
29617 * the argument is handled internally and will deliver the
29618 * optimum resolution. The MJD method and the date & time methods
29619 * are both good compromises between resolution and convenience.
29620 *
29621 * <li> No assumptions are made about whether the coordinates represent
29622 * starlight and embody astrometric effects such as parallax or
29623 * aberration.
29624 *
29625 * <li> The transformation is approximately that from ecliptic longitude
29626 * and latitude (mean equinox and ecliptic of date) to mean J2000.0
29627 * right ascension and declination, with only frame bias (always
29628 * less than 25 mas) to disturb this classical picture.
29629 *</ol>
29630 * Called: <ul>
29631 * <li>{@link #jauS2c} spherical coordinates to unit vector
29632 * <li>{@link #jauEcm06} J2000.0 to ecliptic rotation matrix, IAU 2006
29633 * <li>{@link #jauTrxp} product of transpose of r-matrix and p-vector
29634 * <li>{@link #jauC2s} unit vector to spherical coordinates
29635 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
29636 * <li>{@link #jauAnpm} normalize angle into range +/- pi
29637 *</ul>
29638 *
29639 * @version 2016 February 9
29640 *
29641 * @since JSOFA release 20160503
29642 *
29643 * <!--Copyright (C) 2016 IAU SOFA Board. See notes at end. -->
29644 */
29645 public static SphericalCoordinate jauEceq06(double date1, double date2, double dl, double db)
29646 {
29647
29648
29649 /* Spherical to Cartesian. */
29650 double v1[] = jauS2c(dl, db);
29651
29652 /* Rotation matrix, ICRS equatorial to ecliptic. */
29653 double rm[][] = jauEcm06(date1, date2);
29654
29655 /* The transformation from ecliptic to ICRS. */
29656 double v2[] = jauTrxp(rm, v1);
29657
29658 /* Cartesian to spherical. */
29659 SphericalCoordinate co = jauC2s(v2);
29660
29661 /* Express in conventional ranges. */
29662 co.alpha = jauAnp(co.alpha);
29663 co.delta = jauAnpm(co.delta);
29664
29665 return co;
29666 }
29667
29668 /**
29669 *
29670 * ICRS equatorial to ecliptic rotation matrix, IAU 2006.
29671 *
29672 * <p>This function is derived from the International Astronomical Union's
29673 * SOFA (Standards of Fundamental Astronomy) software collection.
29674 *
29675 * <p>Status: support function.
29676 *
29677 * <!-- Given: -->
29678 * @param date1 double TT as a 2-part Julian date (Note 1)
29679 * @param date2 double TT as a 2-part Julian date (Note 1)
29680 *
29681 * <!-- Returned: -->
29682 * @return double[3][3] ICRS to ecliptic rotation matrix
29683 *
29684 * <p>Notes: <ol>
29685 *
29686 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
29687 * convenient way between the two arguments. For example,
29688 * JD(TT)=2450123.7 could be expressed in any of these ways,
29689 * among others:
29690 *
29691 * date1 date2
29692 *
29693 * 2450123.7 0.0 (JD method)
29694 * 2451545.0 -1421.3 (J2000 method)
29695 * 2400000.5 50123.2 (MJD method)
29696 * 2450123.5 0.2 (date & time method)
29697 *
29698 * The JD method is the most natural and convenient to use in
29699 * cases where the loss of several decimal digits of resolution
29700 * is acceptable. The J2000 method is best matched to the way
29701 * the argument is handled internally and will deliver the
29702 * optimum resolution. The MJD method and the date & time methods
29703 * are both good compromises between resolution and convenience.
29704 *
29705 * <li> The matrix is in the sense
29706 *
29707 * E_ep = rm x P_ICRS,
29708 *
29709 * where P_ICRS is a vector with respect to ICRS right ascension
29710 * and declination axes and E_ep is the same vector with respect to
29711 * the (inertial) ecliptic and equinox of date.
29712 *
29713 * <li> P_ICRS is a free vector, merely a direction, typically of unit
29714 * magnitude, and not bound to any particular spatial origin, such
29715 * as the Earth, Sun or SSB. No assumptions are made about whether
29716 * it represents starlight and embodies astrometric effects such as
29717 * parallax or aberration. The transformation is approximately that
29718 * between mean J2000.0 right ascension and declination and ecliptic
29719 * longitude and latitude, with only frame bias (always less than
29720 * 25 mas) to disturb this classical picture.
29721 * </ol>
29722 * Called: <ul>
29723 * <li>{@link #jauObl06} mean obliquity, IAU 2006
29724 * <li>{@link #jauPmat06} PB matrix, IAU 2006
29725 * <li>{@link #jauIr} initialize r-matrix to identity
29726 * <li>{@link #jauRx} rotate around X-axis
29727 * <li>{@link #jauRxr} product of two r-matrices
29728 *</ul>
29729 *
29730 * @version 2015 December 11
29731 *
29732 * @since JSOFA release 20160503
29733 *
29734 * <!--Copyright (C) 2016 IAU SOFA Board. See notes at end. -->
29735 */
29736 public static double[][] jauEcm06(double date1, double date2)
29737 {
29738 double ob, e[][] = new double[3][3];
29739
29740
29741 /* Obliquity, IAU 2006. */
29742 ob = jauObl06(date1, date2);
29743
29744 /* Precession-bias matrix, IAU 2006. */
29745 double bp[][] = jauPmat06(date1, date2);
29746
29747 /* Equatorial of date to ecliptic matrix. */
29748 jauIr(e);
29749 jauRx(ob, e);
29750
29751 /* ICRS to ecliptic coordinates rotation matrix, IAU 2006. */
29752 return jauRxr(e, bp);
29753
29754 }
29755
29756 /**
29757 *
29758 * Transformation from ICRS equatorial coordinates to ecliptic
29759 * coordinates (mean equinox and ecliptic of date) using IAU 2006
29760 * precession model.
29761 *
29762 * <p>This function is derived from the International Astronomical Union's
29763 * SOFA (Standards of Fundamental Astronomy) software collection.
29764 *
29765 * <p>Status: support function.
29766 *
29767 * <!-- Given: -->
29768 * @param date1 double TT as a 2-part Julian date (Note 1)
29769 * @param date2 double TT as a 2-part Julian date (Note 1)
29770 * @param dr double ICRS right ascension and declination (radians)
29771 * @param dd double ICRS right ascension and declination (radians)
29772 *
29773 * <!-- Returned: -->
29774 * @return double ecliptic longitude and latitude (radians)
29775 *<ol>
29776 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
29777 * convenient way between the two arguments. For example,
29778 * JD(TT)=2450123.7 could be expressed in any of these ways,
29779 * among others:
29780 *
29781 * date1 date2
29782 *
29783 * 2450123.7 0.0 (JD method)
29784 * 2451545.0 -1421.3 (J2000 method)
29785 * 2400000.5 50123.2 (MJD method)
29786 * 2450123.5 0.2 (date & time method)
29787 *
29788 * The JD method is the most natural and convenient to use in
29789 * cases where the loss of several decimal digits of resolution
29790 * is acceptable. The J2000 method is best matched to the way
29791 * the argument is handled internally and will deliver the
29792 * optimum resolution. The MJD method and the date & time methods
29793 * are both good compromises between resolution and convenience.
29794 *
29795 * <li> No assumptions are made about whether the coordinates represent
29796 * starlight and embody astrometric effects such as parallax or
29797 * aberration.
29798 *
29799 * <li> The transformation is approximately that from mean J2000.0 right
29800 * ascension and declination to ecliptic longitude and latitude
29801 * (mean equinox and ecliptic of date), with only frame bias (always
29802 * less than 25 mas) to disturb this classical picture.
29803 *</ol>
29804 * Called:<ul>
29805 * <li>{@link #jauS2c} spherical coordinates to unit vector
29806 * <li>{@link #jauEcm06} J2000.0 to ecliptic rotation matrix, IAU 2006
29807 * <li>{@link #jauRxp} product of r-matrix and p-vector
29808 * <li>{@link #jauC2s} unit vector to spherical coordinates
29809 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
29810 * <li>{@link #jauAnpm} normalize angle into range +/- pi
29811 *</ul>
29812 * @version 2016 February 9
29813 *
29814 * @since JSOFA release 20160503
29815 *
29816 * <!--Copyright (C) 2016 IAU SOFA Board. See notes at end. -->
29817 */
29818 public static SphericalCoordinate jauEqec06(double date1, double date2, double dr, double dd)
29819 {
29820
29821 /* Spherical to Cartesian. */
29822 double v1[] = jauS2c(dr, dd);
29823
29824 /* Rotation matrix, ICRS equatorial to ecliptic. */
29825 double rm[][] = jauEcm06(date1, date2);
29826
29827 /* The transformation from ICRS to ecliptic. */
29828 double v2[] = jauRxp(rm, v1);
29829
29830 /* Cartesian to spherical. */
29831 SphericalCoordinate co = jauC2s(v2);
29832
29833 /* Express in conventional ranges. */
29834 co.alpha = jauAnp(co.alpha);
29835 co.delta = jauAnpm(co.delta);
29836 return co;
29837
29838 }
29839
29840 /**
29841 *
29842 * Transformation from ecliptic coordinates (mean equinox and ecliptic
29843 * of date) to ICRS RA,Dec, using a long-term precession model.
29844 *
29845 * <p>This function is derived from the International Astronomical Union's
29846 * SOFA (Standards of Fundamental Astronomy) software collection.
29847 *
29848 * <p>Status: support function.
29849 *
29850 * <!-- Given: -->
29851 * @param epj double Julian epoch (TT)
29852 * @param dl double ecliptic longitude and latitude (radians)
29853 * @param db double ecliptic longitude and latitude (radians)
29854 *
29855 * <!-- Returned: -->
29856 * @return double ICRS right ascension and declination (radians)
29857 *<ol>
29858 * <li> No assumptions are made about whether the coordinates represent
29859 * starlight and embody astrometric effects such as parallax or
29860 * aberration.
29861 *
29862 * <li> The transformation is approximately that from ecliptic longitude
29863 * and latitude (mean equinox and ecliptic of date) to mean J2000.0
29864 * right ascension and declination, with only frame bias (always
29865 * less than 25 mas) to disturb this classical picture.
29866 *
29867 * <li> The Vondrak et al. (2011, 2012) 400 millennia precession model
29868 * agrees with the IAU 2006 precession at J2000.0 and stays within
29869 * 100 microarcseconds during the 20th and 21st centuries. It is
29870 * accurate to a few arcseconds throughout the historical period,
29871 * worsening to a few tenths of a degree at the end of the
29872 * +/- 200,000 year time span.
29873 *</ol>
29874 * Called:<ul>
29875 * <li>{@link #jauS2c} spherical coordinates to unit vector
29876 * <li>{@link #jauLtecm} J2000.0 to ecliptic rotation matrix, long term
29877 * <li>{@link #jauTrxp} product of transpose of r-matrix and p-vector
29878 * <li>{@link #jauC2s} unit vector to spherical coordinates
29879 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
29880 * <li>{@link #jauAnpm} normalize angle into range +/- pi
29881 *</ul>
29882 * References: <ul>
29883 *
29884 * <li>Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession
29885 * expressions, valid for long time intervals, Astron.Astrophys. 534,
29886 * A22
29887 *
29888 * <li>Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession
29889 * expressions, valid for long time intervals (Corrigendum),
29890 * Astron.Astrophys. 541, C1
29891 *</ul>
29892 * @version 2016 February 9
29893 *
29894 * @since JSOFA release 20160503
29895 *
29896 * <!--Copyright (C) 2016 IAU SOFA Board. See notes at end. -->
29897 */
29898 public static SphericalCoordinate jauLteceq(double epj, double dl, double db)
29899 {
29900
29901 /* Spherical to Cartesian. */
29902 double v1[] = jauS2c(dl, db);
29903
29904 /* Rotation matrix, ICRS equatorial to ecliptic. */
29905 double rm[][] = jauLtecm(epj);
29906
29907 /* The transformation from ecliptic to ICRS. */
29908 double v2[] = jauTrxp(rm, v1);
29909
29910 /* Cartesian to spherical. */
29911 SphericalCoordinate co = jauC2s(v2);
29912
29913 /* Express in conventional ranges. */
29914 co.alpha = jauAnp(co.alpha);
29915 co.delta = jauAnpm(co.delta);
29916 return co;
29917
29918 }
29919
29920 /**
29921 *
29922 * ICRS equatorial to ecliptic rotation matrix, long-term.
29923 *
29924 * <p>This function is derived from the International Astronomical Union's
29925 * SOFA (Standards of Fundamental Astronomy) software collection.
29926 *
29927 * <p>Status: support function.
29928 *
29929 * <!-- Given: -->
29930 * @param epj double Julian epoch (TT)
29931 *
29932 * <!-- Returned: -->
29933 * @return double[3][3] ICRS to ecliptic rotation matrix
29934 *
29935 * <p>Notes: <ol>
29936 *
29937 * <li> The matrix is in the sense
29938 *
29939 * E_ep = rm x P_ICRS,
29940 *
29941 * where P_ICRS is a vector with respect to ICRS right ascension
29942 * and declination axes and E_ep is the same vector with respect to
29943 * the (inertial) ecliptic and equinox of epoch epj.
29944 *
29945 * <li> P_ICRS is a free vector, merely a direction, typically of unit
29946 * magnitude, and not bound to any particular spatial origin, such
29947 * as the Earth, Sun or SSB. No assumptions are made about whether
29948 * it represents starlight and embodies astrometric effects such as
29949 * parallax or aberration. The transformation is approximately that
29950 * between mean J2000.0 right ascension and declination and ecliptic
29951 * longitude and latitude, with only frame bias (always less than
29952 * 25 mas) to disturb this classical picture.
29953 *
29954 * <li> The Vondrak et al. (2011, 2012) 400 millennia precession model
29955 * agrees with the IAU 2006 precession at J2000.0 and stays within
29956 * 100 microarcseconds during the 20th and 21st centuries. It is
29957 * accurate to a few arcseconds throughout the historical period,
29958 * worsening to a few tenths of a degree at the end of the
29959 * +/- 200,000 year time span.
29960 *</ol>
29961 * Called:<ul>
29962 * <li>{@link #jauLtpequ} equator pole, long term
29963 * <li>{@link #jauLtpecl} ecliptic pole, long term
29964 * <li>{@link #jauPxp} vector product
29965 * <li>{@link #jauPn} normalize vector
29966 *</ul>
29967 * References:<ul>
29968 *
29969 * <li>Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession
29970 * expressions, valid for long time intervals, Astron.Astrophys. 534,
29971 * A22
29972 *
29973 * <li>Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession
29974 * expressions, valid for long time intervals (Corrigendum),
29975 * Astron.Astrophys. 541, C1
29976 *</ul>
29977 * @version 2015 December 6
29978 *
29979 * @since JSOFA release 20160503
29980 *
29981 * <!--Copyright (C) 2016 IAU SOFA Board. See notes at end. -->
29982 */
29983 public static double[][] jauLtecm(double epj)
29984 {
29985 double rm[][] = new double[3][3];
29986 /* Frame bias (IERS Conventions 2010, Eqs. 5.21 and 5.33) */
29987 final double dx = -0.016617 * DAS2R,
29988 de = -0.0068192 * DAS2R,
29989 dr = -0.0146 * DAS2R;
29990
29991
29992 /* Equator pole. */
29993 double p[] = jauLtpequ(epj);
29994
29995 /* Ecliptic pole (bottom row of equatorial to ecliptic matrix). */
29996 double z[] = jauLtpecl(epj);
29997
29998 /* Equinox (top row of matrix). */
29999 double w[] = jauPxp(p, z);
30000 NormalizedVector nv = jauPn(w);
30001
30002 double x[] = nv.u;
30003 /* Middle row of matrix. */
30004 double y[] = jauPxp(z, x);
30005
30006 /* Combine with frame bias. */
30007 rm[0][0] = x[0] - x[1]*dr + x[2]*dx;
30008 rm[0][1] = x[0]*dr + x[1] + x[2]*de;
30009 rm[0][2] = - x[0]*dx - x[1]*de + x[2];
30010 rm[1][0] = y[0] - y[1]*dr + y[2]*dx;
30011 rm[1][1] = y[0]*dr + y[1] + y[2]*de;
30012 rm[1][2] = - y[0]*dx - y[1]*de + y[2];
30013 rm[2][0] = z[0] - z[1]*dr + z[2]*dx;
30014 rm[2][1] = z[0]*dr + z[1] + z[2]*de;
30015 rm[2][2] = - z[0]*dx - z[1]*de + z[2];
30016
30017 return rm;
30018
30019 }
30020
30021 /**
30022 *
30023 * Transformation from ICRS equatorial coordinates to ecliptic
30024 * coordinates (mean equinox and ecliptic of date) using a long-term
30025 * precession model.
30026 *
30027 * <p>This function is derived from the International Astronomical Union's
30028 * SOFA (Standards of Fundamental Astronomy) software collection.
30029 *
30030 * <p>Status: support function.
30031 *
30032 * <!-- Given: -->
30033 * @param epj double Julian epoch (TT)
30034 * @param dr double ICRS right ascension and declination (radians)
30035 * @param dd double ICRS right ascension and declination (radians)
30036 *
30037 * <!-- Returned: -->
30038 * @return ecliptic longitude and latitude (radians)
30039 *<ol>
30040 * <li> No assumptions are made about whether the coordinates represent
30041 * starlight and embody astrometric effects such as parallax or
30042 * aberration.
30043 *
30044 * <li> The transformation is approximately that from mean J2000.0 right
30045 * ascension and declination to ecliptic longitude and latitude
30046 * (mean equinox and ecliptic of date), with only frame bias (always
30047 * less than 25 mas) to disturb this classical picture.
30048 *
30049 * <li> The Vondrak et al. (2011, 2012) 400 millennia precession model
30050 * agrees with the IAU 2006 precession at J2000.0 and stays within
30051 * 100 microarcseconds during the 20th and 21st centuries. It is
30052 * accurate to a few arcseconds throughout the historical period,
30053 * worsening to a few tenths of a degree at the end of the
30054 * +/- 200,000 year time span.
30055 *</ol>
30056 * Called:<ul>
30057 * <li>{@link #jauS2c} spherical coordinates to unit vector
30058 * <li>{@link #jauLtecm} J2000.0 to ecliptic rotation matrix, long term
30059 * <li>{@link #jauRxp} product of r-matrix and p-vector
30060 * <li>{@link #jauC2s} unit vector to spherical coordinates
30061 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
30062 * <li>{@link #jauAnpm} normalize angle into range +/- pi
30063 *</ul>
30064 * References:
30065 *
30066 * Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession
30067 * expressions, valid for long time intervals, Astron.Astrophys. 534,
30068 * A22
30069 *
30070 * Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession
30071 * expressions, valid for long time intervals (Corrigendum),
30072 * Astron.Astrophys. 541, C1
30073 *
30074 * @version 2016 February 9
30075 *
30076 * @since JSOFA release 20160503
30077 *
30078 * <!--Copyright (C) 2016 IAU SOFA Board. See notes at end. -->
30079 */
30080 public static SphericalCoordinate jauLteqec(double epj, double dr, double dd)
30081 {
30082
30083 /* Spherical to Cartesian. */
30084 double v1[] = jauS2c(dr, dd);
30085
30086 /* Rotation matrix, ICRS equatorial to ecliptic. */
30087 double rm[][] = jauLtecm(epj);
30088
30089 /* The transformation from ICRS to ecliptic. */
30090 double v2[] = jauRxp(rm, v1);
30091
30092 /* Cartesian to spherical. */
30093 SphericalCoordinate co = jauC2s(v2);
30094
30095 /* Express in conventional ranges. */
30096 co.alpha = jauAnp(co.alpha);
30097 co.delta = jauAnpm(co.delta);
30098
30099 return co;
30100 }
30101
30102 /**
30103 *
30104 * Long-term precession matrix.
30105 *
30106 * <p>This function is derived from the International Astronomical Union's
30107 * SOFA (Standards of Fundamental Astronomy) software collection.
30108 *
30109 * <p>Status: support function.
30110 *
30111 * <!-- Given: -->
30112 * @param epj double Julian epoch (TT)
30113 *
30114 * <!-- Returned: -->
30115 * @return double[3][3] precession matrix, J2000.0 to date
30116 *
30117 * <p>Notes: <ol>
30118 *
30119 * <li> The matrix is in the sense
30120 *
30121 * P_date = rp x P_J2000,
30122 *
30123 * where P_J2000 is a vector with respect to the J2000.0 mean
30124 * equator and equinox and P_date is the same vector with respect to
30125 * the equator and equinox of epoch epj.
30126 *
30127 * <li> The Vondrak et al. (2011, 2012) 400 millennia precession model
30128 * agrees with the IAU 2006 precession at J2000.0 and stays within
30129 * 100 microarcseconds during the 20th and 21st centuries. It is
30130 * accurate to a few arcseconds throughout the historical period,
30131 * worsening to a few tenths of a degree at the end of the
30132 * +/- 200,000 year time span.
30133 *</ol>
30134 * Called:<ul>
30135 * <li>{@link #jauLtpequ} equator pole, long term
30136 * <li>{@link #jauLtpecl} ecliptic pole, long term
30137 * <li>{@link #jauPxp} vector product
30138 * <li>{@link #jauPn} normalize vector
30139 *</ul>
30140 * References:
30141 *
30142 * <p>Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession
30143 * expressions, valid for long time intervals, Astron.Astrophys. 534,
30144 * A22
30145 *
30146 * <p>Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession
30147 * expressions, valid for long time intervals (Corrigendum),
30148 * Astron.Astrophys. 541, C1
30149 *
30150 * @version 2015 December 6
30151 *
30152 * @since JSOFA release 20160503
30153 *
30154 * <!--Copyright (C) 2016 IAU SOFA Board. See notes at end. -->
30155 */
30156 public static double[][] jauLtp(double epj )
30157 {
30158 double rp[][] = new double[3][3];
30159 int i;
30160
30161
30162
30163 /* Equator pole (bottom row of matrix). */
30164 double peqr[] = jauLtpequ(epj);
30165
30166 /* Ecliptic pole. */
30167 double pecl[] = jauLtpecl(epj);
30168
30169 /* Equinox (top row of matrix). */
30170 double v[] = jauPxp(peqr, pecl);
30171 NormalizedVector nv = jauPn(v);
30172
30173 /* Middle row of matrix. */
30174 v = jauPxp(peqr, nv.u);
30175
30176 /* Assemble the matrix. */
30177 for ( i = 0; i < 3; i++ ) {
30178 rp[0][i] = nv.u[i];
30179 rp[1][i] = v[i];
30180 rp[2][i] = peqr[i];
30181 }
30182
30183 return rp;
30184 }
30185
30186
30187 /**
30188 *
30189 * Long-term precession matrix, including ICRS frame bias.
30190 *
30191 * <p>This function is derived from the International Astronomical Union's
30192 * SOFA (Standards of Fundamental Astronomy) software collection.
30193 *
30194 * <p>Status: support function.
30195 *
30196 * <!-- Given: -->
30197 * @param epj double Julian epoch (TT)
30198 *
30199 * <!-- Returned: -->
30200 * @return double[3][3] precession-bias matrix, J2000.0 to date
30201 *
30202 * <p>Notes: <ol>
30203 *
30204 * <li> The matrix is in the sense
30205 *
30206 * P_date = rpb x P_ICRS,
30207 *
30208 * where P_ICRS is a vector in the Geocentric Celestial Reference
30209 * System, and P_date is the vector with respect to the Celestial
30210 * Intermediate Reference System at that date but with nutation
30211 * neglected.
30212 *
30213 * <li> A first order frame bias formulation is used, of sub-
30214 * microarcsecond accuracy compared with a full 3D rotation.
30215 *
30216 * <li> The Vondrak et al. (2011, 2012) 400 millennia precession model
30217 * agrees with the IAU 2006 precession at J2000.0 and stays within
30218 * 100 microarcseconds during the 20th and 21st centuries. It is
30219 * accurate to a few arcseconds throughout the historical period,
30220 * worsening to a few tenths of a degree at the end of the
30221 * +/- 200,000 year time span.
30222 *</ol>
30223 * References:
30224 *
30225 * Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession
30226 * expressions, valid for long time intervals, Astron.Astrophys. 534,
30227 * A22
30228 *
30229 * Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession
30230 * expressions, valid for long time intervals (Corrigendum),
30231 * Astron.Astrophys. 541, C1
30232 *
30233 * @version 2015 December 6
30234 *
30235 * @since JSOFA release 20160503
30236 *
30237 * <!--Copyright (C) 2016 IAU SOFA Board. See notes at end. -->
30238 */
30239 public static double[][] jauLtpb(double epj)
30240 {
30241 double rpb[][] = new double[3][3];
30242 /* Frame bias (IERS Conventions 2010, Eqs. 5.21 and 5.33) */
30243 final double dx = -0.016617 * DAS2R,
30244 de = -0.0068192 * DAS2R,
30245 dr = -0.0146 * DAS2R;
30246
30247 int i;
30248
30249
30250
30251 /* Precession matrix. */
30252 double rp[][] = jauLtp(epj);
30253
30254 /* Apply the bias. */
30255 for ( i = 0; i < 3; i++ ) {
30256 rpb[i][0] = rp[i][0] - rp[i][1]*dr + rp[i][2]*dx;
30257 rpb[i][1] = rp[i][0]*dr + rp[i][1] + rp[i][2]*de;
30258 rpb[i][2] = -rp[i][0]*dx - rp[i][1]*de + rp[i][2];
30259 }
30260
30261 return rpb;
30262 }
30263
30264 /**
30265 *
30266 * Long-term precession of the ecliptic.
30267 *
30268 * <p>This function is derived from the International Astronomical Union's
30269 * SOFA (Standards of Fundamental Astronomy) software collection.
30270 *
30271 * <p>Status: support function.
30272 *
30273 * <!-- Given: -->
30274 * @param epj double Julian epoch (TT)
30275 *
30276 * <!-- Returned: -->
30277 * @return double[3] ecliptic pole unit vector
30278 *
30279 * <p>Notes: <ol>
30280 *
30281 * <li> The returned vector is with respect to the J2000.0 mean equator
30282 * and equinox.
30283 *
30284 * <li> The Vondrak et al. (2011, 2012) 400 millennia precession model
30285 * agrees with the IAU 2006 precession at J2000.0 and stays within
30286 * 100 microarcseconds during the 20th and 21st centuries. It is
30287 * accurate to a few arcseconds throughout the historical period,
30288 * worsening to a few tenths of a degree at the end of the
30289 * +/- 200,000 year time span.
30290 *</ol>
30291 * References:
30292 *
30293 * Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession
30294 * expressions, valid for long time intervals, Astron.Astrophys. 534,
30295 * A22
30296 *
30297 * Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession
30298 * expressions, valid for long time intervals (Corrigendum),
30299 * Astron.Astrophys. 541, C1
30300 *
30301 * @version 2016 February 9
30302 *
30303 * @since JSOFA release 20160503
30304 *
30305 * <!--Copyright (C) 2016 IAU SOFA Board. See notes at end. -->
30306 */
30307 public static double[] jauLtpecl(double epj)
30308 {
30309
30310 double vec[] = new double[3];
30311 /* Obliquity at J2000.0 (radians). */
30312 final double eps0 = 84381.406 * DAS2R;
30313
30314 /* Polynomial coefficients */
30315 final int NPOL = 4 ;
30316 final double pqpol[][] = {
30317 { 5851.607687,
30318 -0.1189000,
30319 -0.00028913,
30320 0.000000101},
30321 {-1600.886300,
30322 1.1689818,
30323 -0.00000020,
30324 -0.000000437}
30325 };
30326
30327 /* Periodic coefficients */
30328 final double pqper[][] = {
30329 { 708.15,-5486.751211,-684.661560, 667.666730,-5523.863691},
30330 {2309.00, -17.127623,2446.283880,-2354.886252, -549.747450},
30331 {1620.00, -617.517403, 399.671049, -428.152441, -310.998056},
30332 { 492.20, 413.442940,-356.652376, 376.202861, 421.535876},
30333 {1183.00, 78.614193,-186.387003, 184.778874, -36.776172},
30334 { 622.00, -180.732815,-316.800070, 335.321713, -145.278396},
30335 { 882.00, -87.676083, 198.296701, -185.138669, -34.744450},
30336 { 547.00, 46.140315, 101.135679, -120.972830, 22.885731}
30337 };
30338 final int NPER = pqper.length;
30339
30340 /* Miscellaneous */
30341 int i;
30342 double t, p, q, w, a, s, c;
30343
30344
30345 /* Centuries since J2000. */
30346 t = ( epj - 2000.0 ) / 100.0;
30347
30348 /* Initialize P_A and Q_A accumulators. */
30349 p = 0.0;
30350 q = 0.0;
30351
30352 /* Periodic terms. */
30353 w = D2PI*t;
30354 for ( i = 0; i < NPER; i++ ) {
30355 a = w/pqper[i][0];
30356 s = sin(a);
30357 c = cos(a);
30358 p += c*pqper[i][1] + s*pqper[i][3];
30359 q += c*pqper[i][2] + s*pqper[i][4];
30360 }
30361
30362 /* Polynomial terms. */
30363 w = 1.0;
30364 for ( i = 0; i < NPOL; i++ ) {
30365 p += pqpol[0][i]*w;
30366 q += pqpol[1][i]*w;
30367 w *= t;
30368 }
30369
30370 /* P_A and Q_A (radians). */
30371 p *= DAS2R;
30372 q *= DAS2R;
30373
30374 /* Form the ecliptic pole vector. */
30375 w = 1.0 - p*p - q*q;
30376 w = w < 0.0 ? 0.0 : sqrt(w);
30377 s = sin(eps0);
30378 c = cos(eps0);
30379 vec[0] = p;
30380 vec[1] = - q*c - w*s;
30381 vec[2] = - q*s + w*c;
30382
30383 return vec;
30384
30385 }
30386
30387 /**
30388 *
30389 * Long-term precession of the equator.
30390 *
30391 * <p>This function is derived from the International Astronomical Union's
30392 * SOFA (Standards of Fundamental Astronomy) software collection.
30393 *
30394 * <p>Status: support function.
30395 *
30396 * <!-- Given: -->
30397 * @param epj double Julian epoch (TT)
30398 *
30399 * <!-- Returned: -->
30400 * @return double[3] equator pole unit vector
30401 *
30402 * <p>Notes: <ol>
30403 *
30404 * <li> The returned vector is with respect to the J2000.0 mean equator
30405 * and equinox.
30406 *
30407 * <li> The Vondrak et al. (2011, 2012) 400 millennia precession model
30408 * agrees with the IAU 2006 precession at J2000.0 and stays within
30409 * 100 microarcseconds during the 20th and 21st centuries. It is
30410 * accurate to a few arcseconds throughout the historical period,
30411 * worsening to a few tenths of a degree at the end of the
30412 * +/- 200,000 year time span.
30413 *</ol>
30414 * References:
30415 *
30416 * Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession
30417 * expressions, valid for long time intervals, Astron.Astrophys. 534,
30418 * A22
30419 *
30420 * Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession
30421 * expressions, valid for long time intervals (Corrigendum),
30422 * Astron.Astrophys. 541, C1
30423 *
30424 * @version 2016 February 9
30425 *
30426 * @since JSOFA release 20160503
30427 *
30428 * <!--Copyright (C) 2016 IAU SOFA Board. See notes at end. -->
30429 */
30430 public static double[] jauLtpequ(double epj)
30431 {
30432 double veq[] = new double[3];
30433 /* Polynomial coefficients */
30434 final int NPOL = 4;
30435 final double xypol[][] = {
30436 { 5453.282155,
30437 0.4252841,
30438 -0.00037173,
30439 -0.000000152},
30440 {-73750.930350,
30441 -0.7675452,
30442 -0.00018725,
30443 0.000000231}
30444 };
30445
30446 /* Periodic coefficients */
30447 final double xyper[][] = {
30448 { 256.75, -819.940624,75004.344875,81491.287984, 1558.515853},
30449 { 708.15,-8444.676815, 624.033993, 787.163481, 7774.939698},
30450 { 274.20, 2600.009459, 1251.136893, 1251.296102,-2219.534038},
30451 { 241.45, 2755.175630,-1102.212834,-1257.950837,-2523.969396},
30452 {2309.00, -167.659835,-2660.664980,-2966.799730, 247.850422},
30453 { 492.20, 871.855056, 699.291817, 639.744522, -846.485643},
30454 { 396.10, 44.769698, 153.167220, 131.600209,-1393.124055},
30455 { 288.90, -512.313065, -950.865637, -445.040117, 368.526116},
30456 { 231.10, -819.415595, 499.754645, 584.522874, 749.045012},
30457 {1610.00, -538.071099, -145.188210, -89.756563, 444.704518},
30458 { 620.00, -189.793622, 558.116553, 524.429630, 235.934465},
30459 { 157.87, -402.922932, -23.923029, -13.549067, 374.049623},
30460 { 220.30, 179.516345, -165.405086, -210.157124, -171.330180},
30461 {1200.00, -9.814756, 9.344131, -44.919798, -22.899655}
30462 };
30463 final int NPER = xyper.length;
30464
30465 /* Miscellaneous */
30466 int i;
30467 double t, x, y, w, a, s, c;
30468
30469
30470 /* Centuries since J2000. */
30471 t = ( epj - 2000.0 ) / 100.0;
30472
30473 /* Initialize X and Y accumulators. */
30474 x = 0.0;
30475 y = 0.0;
30476
30477 /* Periodic terms. */
30478 w = D2PI * t;
30479 for ( i = 0; i < NPER; i++ ) {
30480 a = w / xyper[i][0];
30481 s = sin(a);
30482 c = cos(a);
30483 x += c*xyper[i][1] + s*xyper[i][3];
30484 y += c*xyper[i][2] + s*xyper[i][4];
30485 }
30486
30487 /* Polynomial terms. */
30488 w = 1.0;
30489 for ( i = 0; i < NPOL; i++ ) {
30490 x += xypol[0][i]*w;
30491 y += xypol[1][i]*w;
30492 w *= t;
30493 }
30494
30495 /* X and Y (direction cosines). */
30496 x *= DAS2R;
30497 y *= DAS2R;
30498
30499 /* Form the equator pole vector. */
30500 veq[0] = x;
30501 veq[1] = y;
30502 w = 1.0 - x*x - y*y;
30503 veq[2] = w < 0.0 ? 0.0 : sqrt(w);
30504
30505
30506 return veq;
30507
30508 }
30509
30510 /**
30511 * Position consisting of (ha, declination) pairs in radians. Where ha is hour angle and dec is declination .
30512 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 1 Feb 2010
30513 *
30514 * @since JSOFA release 20180130
30515 */
30516 public static class EquatorialCoordinate {
30517 public double ha;
30518 public double dec;
30519 public EquatorialCoordinate(double ha, double dec){
30520 this.ha = ha;
30521 this.dec = dec;
30522 }
30523 }
30524
30525 /**
30526 *
30527 * Horizon to equatorial coordinates: transform azimuth and altitude
30528 * to hour angle and declination.
30529 *
30530 * <!-- Given: -->
30531 * @param az double azimuth
30532 * @param el double altitude (informally, elevation)
30533 * @param phi double site latitude
30534 *
30535 * <!-- Returned: -->
30536 * @return ha double hour angle (local)
30537 * dec double declination
30538 *
30539 * <p>Notes: <ol>
30540 *
30541 * <li> All the arguments are angles in radians.
30542 *
30543 * <li> The sign convention for azimuth is north zero, east +pi/2.
30544 *
30545 * <li> HA is returned in the range +/-pi. Declination is returned in
30546 * the range +/-pi/2.
30547 *
30548 * <li> The latitude phi is pi/2 minus the angle between the Earth's
30549 * rotation axis and the adopted zenith. In many applications it
30550 * will be sufficient to use the published geodetic latitude of the
30551 * site. In very precise (sub-arcsecond) applications, phi can be
30552 * corrected for polar motion.
30553 *
30554 * <li> The azimuth az must be with respect to the rotational north pole,
30555 * as opposed to the ITRS pole, and an azimuth with respect to north
30556 * on a map of the Earth's surface will need to be adjusted for
30557 * polar motion if sub-arcsecond accuracy is required.
30558 *
30559 * <li> Should the user wish to work with respect to the astronomical
30560 * zenith rather than the geodetic zenith, phi will need to be
30561 * adjusted for deflection of the vertical (often tens of
30562 * arcseconds), and the zero point of ha will also be affected.
30563 *
30564 * <li> The transformation is the same as Ve = Ry(phi-pi/2)*Rz(pi)*Vh,
30565 * where Ve and Vh are lefthanded unit vectors in the (ha,dec) and
30566 * (az,el) systems respectively and Rz and Ry are rotations about
30567 * first the z-axis and then the y-axis. (n.b. Rz(pi) simply
30568 * reverses the signs of the x and y components.) For efficiency,
30569 * the algorithm is written out rather than calling other utility
30570 * functions. For applications that require even greater
30571 * efficiency, additional savings are possible if constant terms
30572 * such as functions of latitude are computed once and for all.
30573 *
30574 * <li> Again for efficiency, no range checking of arguments is carried
30575 * out.
30576 *</ol>
30577 * Last revision: 2017 September 12
30578 *
30579 * @since JSOFA release 20180130
30580 *
30581 */
30582
30583 public static EquatorialCoordinate jauAe2hd (double az, double el, double phi)
30584 {
30585 double sa, ca, se, ce, sp, cp, x, y, z, r;
30586
30587
30588 /* Useful trig functions. */
30589 sa = sin(az);
30590 ca = cos(az);
30591 se = sin(el);
30592 ce = cos(el);
30593 sp = sin(phi);
30594 cp = cos(phi);
30595
30596 /* HA,Dec unit vector. */
30597 x = - ca*ce*sp + se*cp;
30598 y = - sa*ce;
30599 z = ca*ce*cp + se*sp;
30600
30601 /* To spherical. */
30602 r = sqrt(x*x + y*y);
30603 return new EquatorialCoordinate( (r != 0.0) ? atan2(y,x) : 0.0,
30604 atan2(z,r));
30605
30606 /* Finished. */
30607 }
30608
30609
30610 /**
30611 * Position consisting of (az, el) pairs in radians. Where az is the azimuth and el is elevation .
30612 * @author Paul Harrison (paul.harrison@manchester.ac.uk)
30613 *
30614 * @since JSOFA release 20180130
30615 */
30616 public static class HorizonCoordinate {
30617 public double az;
30618 public double el;
30619 public HorizonCoordinate(double az, double el){
30620 this.az = az;
30621 this.el = el;
30622 }
30623 }
30624
30625
30626 /**
30627 *
30628 * Equatorial to horizon coordinates: transform hour angle and
30629 * declination to azimuth and altitude.
30630 *
30631 * <p>This function is derived from the International Astronomical Union's
30632 * SOFA (Standards of Fundamental Astronomy) software collection.
30633 *
30634 * <p>Status: support function.
30635 *
30636 * <!-- Given: -->
30637 * @param ha double hour angle (local)
30638 * @param dec double declination
30639 * @param phi double site latitude
30640 *
30641 * <!-- Returned: -->
30642 * @return az double azimuth
30643 * el double altitude (informally, elevation)
30644 *
30645 * <p>Notes: <ol>
30646 *
30647 * <li> All the arguments are angles in radians.
30648 *
30649 * <li> Azimuth is returned in the range 0-2pi; north is zero, and east
30650 * is +pi/2. Altitude is returned in the range +/- pi/2.
30651 *
30652 * <li> The latitude phi is pi/2 minus the angle between the Earth's
30653 * rotation axis and the adopted zenith. In many applications it
30654 * will be sufficient to use the published geodetic latitude of the
30655 * site. In very precise (sub-arcsecond) applications, phi can be
30656 * corrected for polar motion.
30657 *
30658 * <li> The returned azimuth az is with respect to the rotational north
30659 * pole, as opposed to the ITRS pole, and for sub-arcsecond
30660 * accuracy will need to be adjusted for polar motion if it is to
30661 * be with respect to north on a map of the Earth's surface.
30662 *
30663 * <li> Should the user wish to work with respect to the astronomical
30664 * zenith rather than the geodetic zenith, phi will need to be
30665 * adjusted for deflection of the vertical (often tens of
30666 * arcseconds), and the zero point of the hour angle ha will also
30667 * be affected.
30668 *
30669 * <li> The transformation is the same as Vh = Rz(pi)*Ry(pi/2-phi)*Ve,
30670 * where Vh and Ve are lefthanded unit vectors in the (az,el) and
30671 * (ha,dec) systems respectively and Ry and Rz are rotations about
30672 * first the y-axis and then the z-axis. (n.b. Rz(pi) simply
30673 * reverses the signs of the x and y components.) For efficiency,
30674 * the algorithm is written out rather than calling other utility
30675 * functions. For applications that require even greater
30676 * efficiency, additional savings are possible if constant terms
30677 * such as functions of latitude are computed once and for all.
30678 *
30679 * <li> Again for efficiency, no range checking of arguments is carried
30680 * out.
30681 *</ol>
30682 * Last revision: 2017 September 12
30683 *
30684 * @since JSOFA release 20180130
30685 *
30686 */
30687 public static HorizonCoordinate jauHd2ae (double ha, double dec, double phi)
30688 {
30689 double sh, ch, sd, cd, sp, cp, x, y, z, r, a;
30690
30691
30692 /* Useful trig functions. */
30693 sh = sin(ha);
30694 ch = cos(ha);
30695 sd = sin(dec);
30696 cd = cos(dec);
30697 sp = sin(phi);
30698 cp = cos(phi);
30699
30700 /* Az,Alt unit vector. */
30701 x = - ch*cd*sp + sd*cp;
30702 y = - sh*cd;
30703 z = ch*cd*cp + sd*sp;
30704
30705 /* To spherical. */
30706 r = sqrt(x*x + y*y);
30707 a = (r != 0.0) ? atan2(y,x) : 0.0;
30708 return new HorizonCoordinate((a < 0.0) ? a+D2PI : a,
30709 atan2(z,r));
30710
30711 /* Finished. */
30712 }
30713
30714
30715 /**
30716 *
30717 * Parallactic angle for a given hour angle and declination.
30718 *
30719 * <p>This function is derived from the International Astronomical Union's
30720 * SOFA (Standards of Fundamental Astronomy) software collection.
30721 *
30722 * <p>Status: support function.
30723 *
30724 * <!-- Given: -->
30725 * @param ha double hour angle
30726 * @param dec double declination
30727 * @param phi double site latitude
30728 *
30729 * @return double parallactic angle
30730 *
30731 * <p>Notes: <ol>
30732 *
30733 * <li> All the arguments are angles in radians.
30734 *
30735 * <li> The parallactic angle at a point in the sky is the position
30736 * angle of the vertical, i.e. the angle between the directions to
30737 * the north celestial pole and to the zenith respectively.
30738 *
30739 * <li> The result is returned in the range -pi to +pi.
30740 *
30741 * <li> At the pole itself a zero result is returned.
30742 *
30743 * <li> The latitude phi is pi/2 minus the angle between the Earth's
30744 * rotation axis and the adopted zenith. In many applications it
30745 * will be sufficient to use the published geodetic latitude of the
30746 * site. In very precise (sub-arcsecond) applications, phi can be
30747 * corrected for polar motion.
30748 *
30749 * <li> Should the user wish to work with respect to the astronomical
30750 * zenith rather than the geodetic zenith, phi will need to be
30751 * adjusted for deflection of the vertical (often tens of
30752 * arcseconds), and the zero point of the hour angle ha will also
30753 * be affected.
30754 *</ol>
30755 * Reference:
30756 * Smart, W.M., "Spherical Astronomy", Cambridge University Press,
30757 * 6th edition (Green, 1977), p49.
30758 *
30759 * Last revision: 2017 September 12
30760 *
30761 * @since JSOFA release 20180130
30762 *
30763 */
30764 public static double jauHd2pa (double ha, double dec, double phi)
30765 {
30766 double cp, cqsz, sqsz;
30767
30768
30769 cp = cos(phi);
30770 sqsz = cp*sin(ha);
30771 cqsz = sin(phi)*cos(dec) - cp*sin(dec)*cos(ha);
30772 return ( ( sqsz != 0.0 || cqsz != 0.0 ) ? atan2(sqsz,cqsz) : 0.0 );
30773
30774 /* Finished. */
30775 }
30776
30777
30778 /**
30779 * Tangent point soulutions. A class to contain tangent point soutions and an indication as to how many of the solutions are valid
30780 * @author Paul Harrison (paul.harrison@manchester.ac.uk)
30781 * @since JSOFA release 20180130
30782 */
30783 public static class TangentPointSolution
30784 {
30785 public SphericalCoordinate sol1;
30786 public SphericalCoordinate sol2;
30787
30788 /** nsolutions. The number of useful solutions
30789 */
30790 public int nsolutions;
30791 /**
30792 * @param sol1
30793 * @param sol2
30794 * @param flag
30795 */
30796 public TangentPointSolution(SphericalCoordinate sol1,
30797 SphericalCoordinate sol2, int flag) {
30798 this.sol1 = sol1;
30799 this.sol2 = sol2;
30800 this.nsolutions = flag;
30801 }
30802 public TangentPointSolution()
30803 {
30804 this.sol1 = null;
30805 this.sol2 = null;
30806 this.nsolutions = 0;
30807 }
30808 }
30809 /**
30810 *
30811 * In the tangent plane projection, given the rectangular coordinates
30812 * of a star and its spherical coordinates, determine the spherical
30813 * coordinates of the tangent point.
30814 *
30815 * <p>This function is derived from the International Astronomical Union's
30816 * SOFA (Standards of Fundamental Astronomy) software collection.
30817 *
30818 * <p>Status: support function.
30819 *
30820 * <!-- Given: -->
30821 * @param xi double rectangular coordinates of star image (Note 2)
30822 * @param eta double rectangular coordinates of star image (Note 2)
30823 * @param a double star's spherical coordinates (Note 3)
30824 * @param b double star's spherical coordinates (Note 3)
30825 *
30826 * <!-- Returned: -->
30827 * @return tangent point's spherical coordinate solutions
30828 *
30829 * Returned (function value):
30830 * int number of solutions:
30831 * 0 = no solutions returned (Note 5)
30832 * 1 = only the first solution is useful (Note 6)
30833 * 2 = both solutions are useful (Note 6)
30834 *
30835 * <p>Notes: <ol>
30836 *
30837 * <li> The tangent plane projection is also called the "gnomonic
30838 * projection" and the "central projection".
30839 *
30840 * <li> The eta axis points due north in the adopted coordinate system.
30841 * If the spherical coordinates are observed (RA,Dec), the tangent
30842 * plane coordinates (xi,eta) are conventionally called the
30843 * "standard coordinates". If the spherical coordinates are with
30844 * respect to a right-handed triad, (xi,eta) are also right-handed.
30845 * The units of (xi,eta) are, effectively, radians at the tangent
30846 * point.
30847 *
30848 * <li> All angular arguments are in radians.
30849 *
30850 * <li> The angles a01 and a02 are returned in the range 0-2pi. The
30851 * angles b01 and b02 are returned in the range +/-pi, but in the
30852 * usual, non-pole-crossing, case, the range is +/-pi/2.
30853 *
30854 * <li> Cases where there is no solution can arise only near the poles.
30855 * For example, it is clearly impossible for a star at the pole
30856 * itself to have a non-zero xi value, and hence it is meaningless
30857 * to ask where the tangent point would have to be to bring about
30858 * this combination of xi and dec.
30859 *
30860 * <li> Also near the poles, cases can arise where there are two useful
30861 * solutions. The return value indicates whether the second of the
30862 * two solutions returned is useful; 1 indicates only one useful
30863 * solution, the usual case.
30864 *
30865 * <li> The basis of the algorithm is to solve the spherical triangle PSC,
30866 * where P is the north celestial pole, S is the star and C is the
30867 * tangent point. The spherical coordinates of the tangent point are
30868 * [a0,b0]; writing rho^2 = (xi^2+eta^2) and r^2 = (1+rho^2), side c
30869 * is then (pi/2-b), side p is sqrt(xi^2+eta^2) and side s (to be
30870 * found) is (pi/2-b0). Angle C is given by sin(C) = xi/rho and
30871 * cos(C) = eta/rho. Angle P (to be found) is the longitude
30872 * difference between star and tangent point (a-a0).
30873 *
30874 * <li> This function is a member of the following set:
30875 *
30876 *{@code
30877 * spherical vector solve for
30878 *
30879 * iauTpxes iauTpxev xi,eta
30880 * iauTpsts iauTpstv star
30881 * > iauTpors < iauTporv origin
30882 *}
30883 *</ol>
30884 * Called:
30885 * iauAnp normalize angle into range 0 to 2pi
30886 *
30887 * References:
30888 *
30889 * Calabretta M.R. & Greisen, E.W., 2002, "Representations of
30890 * celestial coordinates in FITS", Astron.Astrophys. 395, 1077
30891 *
30892 * Green, R.M., "Spherical Astronomy", Cambridge University Press,
30893 * 1987, Chapter 13.
30894 *
30895 * @version 2018 January 2
30896 *
30897 * @since JSOFA release 20180130
30898 *
30899 */
30900 public static TangentPointSolution jauTpors(double xi, double eta, double a, double b)
30901 {
30902 double xi2, r, sb, cb, rsb, rcb, w2, w, s, c;
30903 double a01, b01, a02, b02;
30904
30905
30906 xi2 = xi*xi;
30907 r = sqrt(1.0 + xi2 + eta*eta);
30908 sb = sin(b);
30909 cb = cos(b);
30910 rsb = r*sb;
30911 rcb = r*cb;
30912 w2 = rcb*rcb - xi2;
30913 if ( w2 >= 0.0 ) {
30914 w = sqrt(w2);
30915 s = rsb - eta*w;
30916 c = rsb*eta + w;
30917 if ( xi == 0.0 && w == 0.0 ) w = 1.0;
30918 a01 = jauAnp(a - atan2(xi,w));
30919 b01 = atan2(s,c);
30920 w = -w;
30921 s = rsb - eta*w;
30922 c = rsb*eta + w;
30923 a02 = jauAnp(a - atan2(xi,w));
30924 b02 = atan2(s,c);
30925 return new TangentPointSolution(new SphericalCoordinate(a01, b01), new SphericalCoordinate(a02, b02),
30926 (abs(rsb) < 1.0) ? 1 : 2);
30927 } else {
30928 return new TangentPointSolution();
30929 }
30930
30931 /* Finished. */
30932
30933 }
30934
30935 /**
30936 * Tangent point soutions as direction cosines. A container class for two possible solutiuons as well as an indication of the number of valid solutions.
30937 * @author Paul Harrison (paul.harrison@manchester.ac.uk)
30938 * @since 27 Mar 2018
30939 */
30940 public static class TangentPointDirectionCosines {
30941 public double dc1[];
30942 public double dc2[];
30943 /** nsolution. number of valid solutions.
30944 */
30945 public int nsolution;
30946 /**
30947 * @param dc1 direction cosines
30948 * @param dc2 direction cosines
30949 * @param nsolution number of valid solutions
30950 */
30951 public TangentPointDirectionCosines(double[] dc1, double[] dc2,
30952 int nsolution) {
30953 this.dc1 = dc1;
30954 this.dc2 = dc2;
30955 this.nsolution = nsolution;
30956 }
30957 /**
30958 *
30959 */
30960 public TangentPointDirectionCosines() {
30961 this.nsolution = 0;
30962 }
30963
30964 }
30965 /**
30966 *
30967 * In the tangent plane projection, given the rectangular coordinates
30968 * of a star and its direction cosines, determine the direction
30969 * cosines of the tangent point.
30970 *
30971 * <p>This function is derived from the International Astronomical Union's
30972 * SOFA (Standards of Fundamental Astronomy) software collection.
30973 *
30974 * <p>Status: support function.
30975 *
30976 * <!-- Given: -->
30977 * @param xi double rectangular coordinates of star image (Note 2)
30978 * @param eta double rectangular coordinates of star image (Note 2)
30979 * @param v double[3] star's direction cosines (Note 3)
30980 *
30981 * <!-- Returned: -->
30982 * @return tangent point's direction cosines, Solutions 1 & 2
30983 * int number of solutions:
30984 * 0 = no solutions returned (Note 4)
30985 * 1 = only the first solution is useful (Note 5)
30986 * 2 = both solutions are useful (Note 5)
30987 *
30988 * <p>Notes: <ol>
30989 *
30990 * <li> The tangent plane projection is also called the "gnomonic
30991 * projection" and the "central projection".
30992 *
30993 * <li> The eta axis points due north in the adopted coordinate system.
30994 * If the direction cosines represent observed (RA,Dec), the tangent
30995 * plane coordinates (xi,eta) are conventionally called the
30996 * "standard coordinates". If the direction cosines are with
30997 * respect to a right-handed triad, (xi,eta) are also right-handed.
30998 * The units of (xi,eta) are, effectively, radians at the tangent
30999 * point.
31000 *
31001 * <li> The vector v must be of unit length or the result will be wrong.
31002 *
31003 * <li> Cases where there is no solution can arise only near the poles.
31004 * For example, it is clearly impossible for a star at the pole
31005 * itself to have a non-zero xi value, and hence it is meaningless
31006 * to ask where the tangent point would have to be.
31007 *
31008 * <li> Also near the poles, cases can arise where there are two useful
31009 * solutions. The return value indicates whether the second of the
31010 * two solutions returned is useful; 1 indicates only one useful
31011 * solution, the usual case.
31012 *
31013 * <li> The basis of the algorithm is to solve the spherical triangle
31014 * PSC, where P is the north celestial pole, S is the star and C is
31015 * the tangent point. Calling the celestial spherical coordinates
31016 * of the star and tangent point (a,b) and (a0,b0) respectively, and
31017 * writing rho^2 = (xi^2+eta^2) and r^2 = (1+rho^2), and
31018 * transforming the vector v into (a,b) in the normal way, side c is
31019 * then (pi/2-b), side p is sqrt(xi^2+eta^2) and side s (to be
31020 * found) is (pi/2-b0), while angle C is given by sin(C) = xi/rho
31021 * and cos(C) = eta/rho; angle P (to be found) is (a-a0). After
31022 * solving the spherical triangle, the result (a0,b0) can be
31023 * expressed in vector form as v0.
31024 *
31025 * <li> This function is a member of the following set:
31026 * {@code
31027 * spherical vector solve for
31028 *
31029 * iauTpxes iauTpxev xi,eta
31030 * iauTpsts iauTpstv star
31031 * iauTpors > iauTporv < origin
31032 * }
31033 *</ol>
31034 * References:
31035 *
31036 * Calabretta M.R. & Greisen, E.W., 2002, "Representations of
31037 * celestial coordinates in FITS", Astron.Astrophys. 395, 1077
31038 *
31039 * Green, R.M., "Spherical Astronomy", Cambridge University Press,
31040 * 1987, Chapter 13.
31041 *
31042 * @version 2018 January 2
31043 *
31044 * @since JSOFA release 20180130
31045 *
31046 */
31047
31048 public static TangentPointDirectionCosines jauTporv(double xi, double eta, double v[])
31049 {
31050 double x, y, z, rxy2, xi2, eta2p1, r, rsb, rcb, w2, w, c;
31051 double v01[] = new double[3];
31052 double v02[] = new double[3];
31053
31054 x = v[0];
31055 y = v[1];
31056 z = v[2];
31057 rxy2 = x*x + y*y;
31058 xi2 = xi*xi;
31059 eta2p1 = eta*eta + 1.0;
31060 r = sqrt(xi2 + eta2p1);
31061 rsb = r*z;
31062 rcb = r*sqrt(x*x + y*y);
31063 w2 = rcb*rcb - xi2;
31064 if ( w2 > 0.0 ) {
31065 w = sqrt(w2);
31066 c = (rsb*eta + w) / (eta2p1*sqrt(rxy2*(w2+xi2)));
31067 v01[0] = c * (x*w + y*xi);
31068 v01[1] = c * (y*w - x*xi);
31069 v01[2] = (rsb - eta*w) / eta2p1;
31070 w = - w;
31071 c = (rsb*eta + w) / (eta2p1*sqrt(rxy2*(w2+xi2)));
31072 v02[0] = c * (x*w + y*xi);
31073 v02[1] = c * (y*w - x*xi);
31074 v02[2] = (rsb - eta*w) / eta2p1;
31075 return new TangentPointDirectionCosines(v01,v02,(abs(rsb) < 1.0) ? 1 : 2);
31076 } else {
31077 return new TangentPointDirectionCosines();
31078 }
31079
31080 /* Finished. */
31081 }
31082
31083 /**
31084 *
31085 * In the tangent plane projection, given the star's rectangular
31086 * coordinates and the spherical coordinates of the tangent point,
31087 * solve for the spherical coordinates of the star.
31088 *
31089 * <p>This function is derived from the International Astronomical Union's
31090 * SOFA (Standards of Fundamental Astronomy) software collection.
31091 *
31092 * <p>Status: support function.
31093 *
31094 * <!-- Given: -->
31095 * @param xi double rectangular coordinates of star image (Note 2)
31096 * @param eta double rectangular coordinates of star image (Note 2)
31097 * @param a0 double tangent point's spherical coordinates
31098 * @param b0 double tangent point's spherical coordinates
31099 *
31100 * <!-- Returned: -->
31101 * @return star's spherical coordinates
31102 *<ol>
31103 * <li> The tangent plane projection is also called the "gnomonic
31104 * projection" and the "central projection".
31105 *
31106 * <li> The eta axis points due north in the adopted coordinate system.
31107 * If the spherical coordinates are observed (RA,Dec), the tangent
31108 * plane coordinates (xi,eta) are conventionally called the
31109 * "standard coordinates". If the spherical coordinates are with
31110 * respect to a right-handed triad, (xi,eta) are also right-handed.
31111 * The units of (xi,eta) are, effectively, radians at the tangent
31112 * point.
31113 *
31114 * <li> All angular arguments are in radians.
31115 *
31116 * <li> This function is a member of the following set:
31117 *{@code
31118 * spherical vector solve for
31119 *
31120 * iauTpxes iauTpxev xi,eta
31121 * > iauTpsts < iauTpstv star
31122 * iauTpors iauTporv origin
31123 * }
31124 *</ol>
31125 * Called:
31126 * iauAnp normalize angle into range 0 to 2pi
31127 *
31128 * References:
31129 *
31130 * Calabretta M.R. & Greisen, E.W., 2002, "Representations of
31131 * celestial coordinates in FITS", Astron.Astrophys. 395, 1077
31132 *
31133 * Green, R.M., "Spherical Astronomy", Cambridge University Press,
31134 * 1987, Chapter 13.
31135 *
31136 * @version 2018 January 2
31137 *
31138 * @since JSOFA release 20180130
31139 *
31140 */
31141 public static SphericalCoordinate jauTpsts(double xi, double eta, double a0, double b0)
31142 {
31143 double sb0, cb0, d;
31144
31145 sb0 = sin(b0);
31146 cb0 = cos(b0);
31147 d = cb0 - eta*sb0;
31148 return new SphericalCoordinate( jauAnp(atan2(xi,d) + a0),
31149 atan2(sb0+eta*cb0, sqrt(xi*xi+d*d)));
31150
31151 /* Finished. */
31152 }
31153
31154 /**
31155 * Tangent Plane Position consisting of (xi, eta) pairs in radians.
31156 *
31157 *
31158 * <p>Notes: <ol>
31159 *
31160 * <li> The tangent plane projection is also called the "gnomonic
31161 * projection" and the "central projection".
31162 *
31163 * <li> The eta axis points due north in the adopted coordinate system.
31164 * If the spherical coordinates are observed (RA,Dec), the tangent
31165 * plane coordinates (xi,eta) are conventionally called the
31166 * "standard coordinates". For right-handed spherical coordinates,
31167 * (xi,eta) are also right-handed. The units of (xi,eta) are,
31168 * effectively, radians at the tangent point.
31169 * </ol>
31170 * @author Paul Harrison (paul.harrison@manchester.ac.uk)
31171 *
31172 * @since JSOFA release 20180130
31173 */
31174 public static class TangentPlaneCoordinate {
31175 public double xi;
31176 public double eta;
31177 /** status.
31178 * 0 = OK
31179 * 1 = star too far from axis
31180 * 2 = antistar on tangent plane
31181 * 3 = antistar too far from axis
31182 */
31183 public int status;
31184 public TangentPlaneCoordinate(double xi, double eta, int j){
31185 this.xi = xi;
31186 this.eta = eta;
31187 this.status = j;
31188 }
31189 }
31190
31191
31192 /**
31193 *
31194 * In the tangent plane projection, given the star's rectangular
31195 * coordinates and the direction cosines of the tangent point, solve
31196 * for the direction cosines of the star.
31197 *
31198 * <p>This function is derived from the International Astronomical Union's
31199 * SOFA (Standards of Fundamental Astronomy) software collection.
31200 *
31201 * <p>Status: support function.
31202 *
31203 * <!-- Given: -->
31204 * @param xi double rectangular coordinates of star image (Note 2)
31205 * @param eta double rectangular coordinates of star image (Note 2)
31206 * @param v0 double[3] tangent point's direction cosines
31207 *
31208 * <!-- Returned: -->
31209 * @return double[3] star's direction cosines
31210 * <ol>
31211 * <li> The tangent plane projection is also called the "gnomonic
31212 * projection" and the "central projection".
31213 *
31214 * <li> The eta axis points due north in the adopted coordinate system.
31215 * If the direction cosines represent observed (RA,Dec), the tangent
31216 * plane coordinates (xi,eta) are conventionally called the
31217 * "standard coordinates". If the direction cosines are with
31218 * respect to a right-handed triad, (xi,eta) are also right-handed.
31219 * The units of (xi,eta) are, effectively, radians at the tangent
31220 * point.
31221 *
31222 * <li> The method used is to complete the star vector in the (xi,eta)
31223 * based triad and normalize it, then rotate the triad to put the
31224 * tangent point at the pole with the x-axis aligned to zero
31225 * longitude. Writing (a0,b0) for the celestial spherical
31226 * coordinates of the tangent point, the sequence of rotations is
31227 * (b-pi/2) around the x-axis followed by (-a-pi/2) around the
31228 * z-axis.
31229 *
31230 * <li> If vector v0 is not of unit length, the returned vector v will
31231 * be wrong.
31232 *
31233 * <li> If vector v0 points at a pole, the returned vector v will be
31234 * based on the arbitrary assumption that the longitude coordinate
31235 * of the tangent point is zero.
31236 *
31237 * <li> This function is a member of the following set:
31238 *{@code
31239 * spherical vector solve for
31240 *
31241 * iauTpxes iauTpxev xi,eta
31242 * iauTpsts > iauTpstv < star
31243 * iauTpors iauTporv origin
31244 * }
31245 *</ol>
31246 * References:
31247 *
31248 * Calabretta M.R. & Greisen, E.W., 2002, "Representations of
31249 * celestial coordinates in FITS", Astron.Astrophys. 395, 1077
31250 *
31251 * Green, R.M., "Spherical Astronomy", Cambridge University Press,
31252 * 1987, Chapter 13.
31253 *
31254 * @version 2018 January 2
31255 *
31256 * @since JSOFA release 20180130
31257 *
31258 */
31259 public static double[] jauTpstv(double xi, double eta, double v0[])
31260 {
31261 double x, y, z, f, r;
31262 double v[] = new double[3];
31263
31264
31265 /* Tangent point. */
31266 x = v0[0];
31267 y = v0[1];
31268 z = v0[2];
31269
31270 /* Deal with polar case. */
31271 r = sqrt(x*x + y*y);
31272 if ( r == 0.0 ) {
31273 r = 1e-20;
31274 x = r;
31275 }
31276
31277 /* Star vector length to tangent plane. */
31278 f = sqrt(1.0 + xi*xi + eta*eta);
31279
31280 /* Apply the transformation and normalize. */
31281 v[0] = (x - (xi*y + eta*x*z) / r) / f;
31282 v[1] = (y + (xi*x - eta*y*z) / r) / f;
31283 v[2] = (z + eta*r) / f;
31284 return v;
31285
31286 /* Finished. */
31287
31288 }
31289
31290 /**
31291 *
31292 * In the tangent plane projection, given celestial spherical
31293 * coordinates for a star and the tangent point, solve for the star's
31294 * rectangular coordinates in the tangent plane.
31295 *
31296 * <p>This function is derived from the International Astronomical Union's
31297 * SOFA (Standards of Fundamental Astronomy) software collection.
31298 *
31299 * <p>Status: support function.
31300 *
31301 * <!-- Given: -->
31302 * @param a double star's spherical coordinates
31303 * @param b double star's spherical coordinates
31304 * @param a0 double tangent point's spherical coordinates
31305 * @param b0 double tangent point's spherical coordinates
31306 *
31307 * <!-- Returned: -->
31308 * @return rectangular coordinates of star image (Note 2)
31309 * int status: 0 = OK
31310 * 1 = star too far from axis
31311 * 2 = antistar on tangent plane
31312 * 3 = antistar too far from axis
31313 *
31314 * <p>Notes: <ol>
31315 *
31316 * <li> The tangent plane projection is also called the "gnomonic
31317 * projection" and the "central projection".
31318 *
31319 * <li> The eta axis points due north in the adopted coordinate system.
31320 * If the spherical coordinates are observed (RA,Dec), the tangent
31321 * plane coordinates (xi,eta) are conventionally called the
31322 * "standard coordinates". For right-handed spherical coordinates,
31323 * (xi,eta) are also right-handed. The units of (xi,eta) are,
31324 * effectively, radians at the tangent point.
31325 *
31326 * <li> All angular arguments are in radians.
31327 *
31328 * <li> This function is a member of the following set:
31329 *{@code
31330 * spherical vector solve for
31331 *
31332 * > iauTpxes < iauTpxev xi,eta
31333 * iauTpsts iauTpstv star
31334 * iauTpors iauTporv origin
31335 *}
31336 *</ol>
31337 * References:
31338 *
31339 * Calabretta M.R. & Greisen, E.W., 2002, "Representations of
31340 * celestial coordinates in FITS", Astron.Astrophys. 395, 1077
31341 *
31342 * Green, R.M., "Spherical Astronomy", Cambridge University Press,
31343 * 1987, Chapter 13.
31344 *
31345 * @version 2018 January 2
31346 *
31347 * @since JSOFA release 20180130
31348 *
31349 */
31350 public static TangentPlaneCoordinate jauTpxes(double a, double b, double a0, double b0)
31351 {
31352 int j;
31353 double sb0, sb, cb0, cb, da, sda, cda, d;
31354
31355
31356 /* Functions of the spherical coordinates. */
31357 sb0 = sin(b0);
31358 sb = sin(b);
31359 cb0 = cos(b0);
31360 cb = cos(b);
31361 da = a - a0;
31362 sda = sin(da);
31363 cda = cos(da);
31364
31365 /* Reciprocal of star vector length to tangent plane. */
31366 d = sb*sb0 + cb*cb0*cda;
31367
31368 /* Check for error cases. */
31369 if ( d > TANGENT_TINY ) {
31370 j = 0;
31371 } else if ( d >= 0.0 ) {
31372 j = 1;
31373 d = TANGENT_TINY;
31374 } else if ( d > -TANGENT_TINY ) {
31375 j = 2;
31376 d = -TANGENT_TINY;
31377 } else {
31378 j = 3;
31379 }
31380
31381 /* Return the tangent plane coordinates (even in dubious cases). */
31382 return new TangentPlaneCoordinate( cb*sda / d,
31383 (sb*cb0 - cb*sb0*cda) / d, j);
31384
31385
31386 /* Finished. */
31387 }
31388
31389 /**
31390 *
31391 * In the tangent plane projection, given celestial direction cosines
31392 * for a star and the tangent point, solve for the star's rectangular
31393 * coordinates in the tangent plane.
31394 *
31395 * <p>This function is derived from the International Astronomical Union's
31396 * SOFA (Standards of Fundamental Astronomy) software collection.
31397 *
31398 * <p>Status: support function.
31399 *
31400 * <!-- Given: -->
31401 * @param v double[3] direction cosines of star (Note 4)
31402 * @param v0 double[3] direction cosines of tangent point (Note 4)
31403 *
31404 * <!-- Returned: -->
31405 * @return tangent plane coordinates of star
31406 * int status: 0 = OK
31407 * 1 = star too far from axis
31408 * 2 = antistar on tangent plane
31409 * 3 = antistar too far from axis
31410 *
31411 * <p>Notes: <ol>
31412 *
31413 * <li> The tangent plane projection is also called the "gnomonic
31414 * projection" and the "central projection".
31415 *
31416 * <li> The eta axis points due north in the adopted coordinate system.
31417 * If the direction cosines represent observed (RA,Dec), the tangent
31418 * plane coordinates (xi,eta) are conventionally called the
31419 * "standard coordinates". If the direction cosines are with
31420 * respect to a right-handed triad, (xi,eta) are also right-handed.
31421 * The units of (xi,eta) are, effectively, radians at the tangent
31422 * point.
31423 *
31424 * <li> The method used is to extend the star vector to the tangent
31425 * plane and then rotate the triad so that (x,y) becomes (xi,eta).
31426 * Writing (a,b) for the celestial spherical coordinates of the
31427 * star, the sequence of rotations is (a+pi/2) around the z-axis
31428 * followed by (pi/2-b) around the x-axis.
31429 *
31430 * <li> If vector v0 is not of unit length, or if vector v is of zero
31431 * length, the results will be wrong.
31432 *
31433 * <li> If v0 points at a pole, the returned (xi,eta) will be based on
31434 * the arbitrary assumption that the longitude coordinate of the
31435 * tangent point is zero.
31436 *
31437 * <li> This function is a member of the following set:
31438 *{@code
31439 * spherical vector solve for
31440 *
31441 * iauTpxes > iauTpxev < xi,eta
31442 * iauTpsts iauTpstv star
31443 * iauTpors iauTporv origin
31444 * }
31445 *</ol>
31446 * References:
31447 *
31448 * Calabretta M.R. & Greisen, E.W., 2002, "Representations of
31449 * celestial coordinates in FITS", Astron.Astrophys. 395, 1077
31450 *
31451 * Green, R.M., "Spherical Astronomy", Cambridge University Press,
31452 * 1987, Chapter 13.
31453 *
31454 * @version 2018 January 2
31455 *
31456 * @since JSOFA release 20180130
31457 *
31458 */
31459 public static TangentPlaneCoordinate jauTpxev(double v[], double v0[])
31460 {
31461 int j;
31462 double x, y, z, x0, y0, z0, r2, r, w, d;
31463
31464
31465 /* Star and tangent point. */
31466 x = v[0];
31467 y = v[1];
31468 z = v[2];
31469 x0 = v0[0];
31470 y0 = v0[1];
31471 z0 = v0[2];
31472
31473 /* Deal with polar case. */
31474 r2 = x0*x0 + y0*y0;
31475 r = sqrt(r2);
31476 if ( r == 0.0 ) {
31477 r = 1e-20;
31478 x0 = r;
31479 }
31480
31481 /* Reciprocal of star vector length to tangent plane. */
31482 w = x*x0 + y*y0;
31483 d = w + z*z0;
31484
31485 /* Check for error cases. */
31486 if ( d > TANGENT_TINY ) {
31487 j = 0;
31488 } else if ( d >= 0.0 ) {
31489 j = 1;
31490 d = TANGENT_TINY;
31491 } else if ( d > -TANGENT_TINY ) {
31492 j = 2;
31493 d = -TANGENT_TINY;
31494 } else {
31495 j = 3;
31496 }
31497
31498 /* Return the tangent plane coordinates (even in dubious cases). */
31499 d *= r;
31500 return new TangentPlaneCoordinate( (y*x0 - x*y0) / d,
31501 (z*r2 - z0*w) / d, j);
31502
31503
31504 /* Finished. */
31505 }
31506
31507 /**
31508 * Convert B1950.0 FK4 star catalog data to J2000.0 FK5.
31509 * This function converts a star's catalog data from the old FK4
31510 * (Bessel-Newcomb) system to the later IAU 1976 FK5 (Fricke) system.
31511 *
31512 * <p>This function is derived from the International Astronomical Union's
31513 * SOFA (Standards of Fundamental Astronomy) software collection.
31514 *
31515 * Status: support function.
31516 *
31517 *
31518 * <!-- Given: --> (all B1950.0, FK4)
31519 * @param r1950 double B1950.0 RA (rad)
31520 * @param d1950 double B1950.0 Dec (rad)
31521 * @param dr1950 double B1950.0 proper motions (rad/trop.yr)
31522 * @param dd1950 double B1950.0 proper motions (rad/trop.yr)
31523 * @param p1950 double parallax (arcsec)
31524 * @param v1950 double radial velocity (km/s, +ve = moving away)
31525 * Returned:
31526 *
31527 * @return - catalogue coordinates (all J2000.0, FK5)
31528 *
31529 * <p>Notes: <ol>
31530 *
31531 * <li> The proper motions in RA are dRA/dt rather than cos(Dec)*dRA/dt,
31532 * and are per year rather than per century.
31533 * <li> The conversion is somewhat complicated, for several reasons:
31534 * . Change of standard epoch from B1950.0 to J2000.0.
31535 * . An intermediate transition date of 1984 January 1.0 TT.
31536 * . A change of precession model.
31537 * . Change of time unit for proper motion (tropical to Julian).
31538 * . FK4 positions include the E-terms of aberration, to simplify
31539 * the hand computation of annual aberration. FK5 positions
31540 * assume a rigorous aberration computation based on the Earth's
31541 * barycentric velocity.
31542 * . The E-terms also affect proper motions, and in particular cause
31543 * objects at large distances to exhibit fictitious proper
31544 * motions.
31545 * The algorithm is based on Smith et al. (1989) and Yallop et al.
31546 * (1989), which presented a matrix method due to Standish (1982) as
31547 * developed by Aoki et al. (1983), using Kinoshita's development of
31548 * Andoyer's post-Newcomb precession. The numerical constants from
31549 * Seidelmann (1992) are used canonically.
31550 * <li> Conversion from B1950.0 FK4 to J2000.0 FK5 only is provided for.
31551 * Conversions for different epochs and equinoxes would require
31552 * additional treatment for precession, proper motion and E-terms.
31553 * <li> In the FK4 catalog the proper motions of stars within 10 degrees
31554 * of the poles do not embody differential E-terms effects and
31555 * should, strictly speaking, be handled in a different manner from
31556 * stars outside these regions. However, given the general lack of
31557 * homogeneity of the star data available for routine astrometry,
31558 * the difficulties of handling positions that may have been
31559 * determined from astrometric fields spanning the polar and non-
31560 * polar regions, the likelihood that the differential E-terms
31561 * effect was not taken into account when allowing for proper motion
31562 * in past astrometry, and the undesirability of a discontinuity in
31563 * the algorithm, the decision has been made in this SOFA algorithm
31564 * to include the effects of differential E-terms on the proper
31565 * motions for all stars, whether polar or not. At epoch J2000.0,
31566 * and measuring "on the sky" rather than in terms of RA change, the
31567 * errors resulting from this simplification are less than
31568 * 1 milliarcsecond in position and 1 milliarcsecond per century in
31569 * proper motion.
31570 * </ol>
31571 * Called:
31572 * iauAnp normalize angle into range 0 to 2pi
31573 * iauPv2s pv-vector to spherical coordinates
31574 * iauPdp scalar product of two p-vectors
31575 * iauPvmpv pv-vector minus pv_vector
31576 * iauPvppv pv-vector plus pv_vector
31577 * iauS2pv spherical coordinates to pv-vector
31578 * iauSxp multiply p-vector by scalar
31579 * <p> References: <ul>
31580 * <li> Aoki, S. et al., 1983, "Conversion matrix of epoch B1950.0
31581 * FK4-based positions of stars to epoch J2000.0 positions in
31582 * accordance with the new IAU resolutions". Astron.Astrophys.
31583 * 128, 263-267.
31584 * <li>Seidelmann, P.K. (ed), 1992, "Explanatory Supplement to the
31585 * Astronomical Almanac", ISBN 0-935702-68-7.
31586 * <li>Smith, C.A. et al., 1989, "The transformation of astrometric
31587 * catalog systems to the equinox J2000.0". Astron.J. 97, 265.
31588 * <li>Standish, E.M., 1982, "Conversion of positions and proper motions
31589 * from B1950.0 to the IAU system at J2000.0". Astron.Astrophys.,
31590 * 115, 1, 20-22.
31591 * <li>Yallop, B.D. et al., 1989, "Transformation of mean star places
31592 * from FK4 B1950.0 to FK5 J2000.0 using matrices in 6-space".
31593 * Astron.J. 97, 274.
31594 * </ul>
31595 * @version 2018 December 5
31596 * @since SOFA release 2019-07-22
31597 */
31598 public static CatalogCoords jauFk425(double r1950, double d1950,
31599 double dr1950, double dd1950,
31600 double p1950, double v1950
31601 )
31602 {
31603 /* Radians per year to arcsec per century */
31604 final double PMF = 100.0*DR2AS;
31605
31606 /* Small number to avoid arithmetic problems */
31607 final double TINY = 1e-30;
31608
31609 /* Miscellaneous */
31610 double r, d, ur, ud, px, rv, pxvf, w;
31611 int i, j, k, l;
31612
31613 /* Pv-vectors */
31614 double r0[][],
31615 pv1[][], pv2[][] = new double[2][3];
31616
31617 /*
31618 * CANONICAL CONSTANTS (Seidelmann 1992)
31619 */
31620
31621 /* Km per sec to AU per tropical century */
31622 /* = 86400 * 36524.2198782 / 149597870.7 */
31623 final double VF = 21.095;
31624
31625 /* Constant pv-vector (cf. Seidelmann 3.591-2, vectors A and Adot) */
31626 final double a[][] = new double[][] {
31627 { -1.62557e-6, -0.31919e-6, -0.13843e-6 },
31628 { +1.245e-3, -1.580e-3, -0.659e-3 }
31629 };
31630
31631 /* 3x2 matrix of pv-vectors (cf. Seidelmann 3.591-4, matrix M) */
31632 final double em[][][][] = new double [][][][] {
31633
31634 { { { +0.9999256782, -0.0111820611, -0.0048579477 },
31635 { +0.00000242395018, -0.00000002710663, -0.00000001177656 } },
31636
31637 { { +0.0111820610, +0.9999374784, -0.0000271765 },
31638 { +0.00000002710663, +0.00000242397878, -0.00000000006587 } },
31639
31640 { { +0.0048579479, -0.0000271474, +0.9999881997, },
31641 { +0.00000001177656, -0.00000000006582, +0.00000242410173 } } },
31642
31643 { { { -0.000551, -0.238565, +0.435739 },
31644 { +0.99994704, -0.01118251, -0.00485767 } },
31645
31646 { { +0.238514, -0.002667, -0.008541 },
31647 { +0.01118251, +0.99995883, -0.00002718 } },
31648
31649 { { -0.435623, +0.012254, +0.002117 },
31650 { +0.00485767, -0.00002714, +1.00000956 } } }
31651
31652 };
31653
31654 /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
31655
31656 /* The FK4 data (units radians and arcsec per tropical century). */
31657 r = r1950;
31658 d = d1950;
31659 ur = dr1950*PMF;
31660 ud = dd1950*PMF;
31661 px = p1950;
31662 rv = v1950;
31663
31664 /* Express as a pv-vector. */
31665 pxvf = px*VF;
31666 w = rv*pxvf;
31667 r0 = jauS2pv(r, d, 1.0, ur, ud, w);
31668
31669 /* Allow for E-terms (cf. Seidelmann 3.591-2). */
31670 pv1 = jauPvmpv(r0, a);
31671 pv2[0] = jauSxp(jauPdp(r0[0], a[0]), r0[0]);
31672 pv2[1] = jauSxp(jauPdp(r0[0], a[1]), r0[0]);
31673 pv1 = jauPvppv(pv1, pv2);
31674
31675 /* Convert pv-vector to Fricke system (cf. Seidelmann 3.591-3). */
31676 for ( i = 0; i < 2; i++ ) {
31677 for ( j = 0; j < 3; j++ ) {
31678 w = 0.0;
31679 for ( k = 0; k < 2; k++ ) {
31680 for ( l = 0; l < 3; l++ ) {
31681 w += em[i][j][k][l] * pv1[k][l];
31682 }
31683 }
31684 pv2[i][j] = w;
31685 }
31686 }
31687
31688 /* Revert to catalog form. */
31689 SphericalPositionVelocity sv = jauPv2s(pv2);//, &r, &d, &w, &ur, &ud, &rd);
31690 if ( px > TINY ) {
31691 rv = sv.vel.r/pxvf;
31692 px = px/sv.pos.r;
31693 }
31694
31695 /* Return the results. */
31696 return new CatalogCoords(jauAnp(sv.pos.theta), sv.pos.phi, sv.vel.theta/PMF, sv.vel.phi/PMF, px, rv);
31697
31698 }
31699
31700
31701 /**
31702 * Convert a B1950.0 FK4 star position to J2000.0 FK5, assuming zero
31703 * proper motion in the FK5 system.
31704 * <p>This function is derived from the International Astronomical Union's
31705 * SOFA (Standards of Fundamental Astronomy) software collection.
31706 * Status: support function.
31707 * This function converts a star's catalog data from the old FK4
31708 * (Bessel-Newcomb) system to the later IAU 1976 FK5 (Fricke) system,
31709 * in such a way that the FK5 proper motion is zero. Because such a
31710 * star has, in general, a non-zero proper motion in the FK4 system,
31711 * the routine requires the epoch at which the position in the FK4
31712 * system was determined.
31713 *
31714 * <!-- Given: -->
31715 * @param r1950 double B1950.0 FK4 RA at epoch (rad)
31716 * @param d1950 double B1950.0 FK4 Dec at epoch (rad)
31717 * @param bepoch double Besselian epoch (e.g. 1979.3D0)
31718 * <!-- Returned: -->
31719 * @return J2000.0 FK5 RA,Dec (rad)
31720 * <p>Notes: <ol>
31721
31722 * <li> The epoch bepoch is strictly speaking Besselian, but if a
31723 * Julian epoch is supplied the result will be affected only to a
31724 * negligible extent.
31725 * <li> The method is from Appendix 2 of Aoki et al. (1983), but using
31726 * the constants of Seidelmann (1992). See the routine iauFk425
31727 * for a general introduction to the FK4 to FK5 conversion.
31728 * <li> Conversion from equinox B1950.0 FK4 to equinox J2000.0 FK5 only
31729 * is provided for. Conversions for different starting and/or
31730 * ending epochs would require additional treatment for precession,
31731 * proper motion and E-terms.
31732 * <li> In the FK4 catalog the proper motions of stars within 10 degrees
31733 * of the poles do not embody differential E-terms effects and
31734 * should, strictly speaking, be handled in a different manner from
31735 * stars outside these regions. However, given the general lack of
31736 * homogeneity of the star data available for routine astrometry,
31737 * the difficulties of handling positions that may have been
31738 * determined from astrometric fields spanning the polar and non-
31739 * polar regions, the likelihood that the differential E-terms
31740 * effect was not taken into account when allowing for proper motion
31741 * in past astrometry, and the undesirability of a discontinuity in
31742 * the algorithm, the decision has been made in this SOFA algorithm
31743 * to include the effects of differential E-terms on the proper
31744 * motions for all stars, whether polar or not. At epoch 2000.0,
31745 * and measuring "on the sky" rather than in terms of RA change, the
31746 * errors resulting from this simplification are less than
31747 * 1 milliarcsecond in position and 1 milliarcsecond per century in
31748 * proper motion.
31749 * </ol>
31750 * <p> References: <ul>
31751 * <li>Aoki, S. et al., 1983, "Conversion matrix of epoch B1950.0
31752 * FK4-based positions of stars to epoch J2000.0 positions in
31753 * accordance with the new IAU resolutions". Astron.Astrophys.
31754 * 128, 263-267.
31755 * <li>Seidelmann, P.K. (ed), 1992, "Explanatory Supplement to the
31756 * Astronomical Almanac", ISBN 0-935702-68-7.
31757 * </ul>
31758 * Called:
31759 * iauAnp normalize angle into range 0 to 2pi
31760 * iauC2s p-vector to spherical
31761 * iauEpb2jd Besselian epoch to Julian date
31762 * iauEpj Julian date to Julian epoch
31763 * iauPdp scalar product of two p-vectors
31764 * iauPmp p-vector minus p-vector
31765 * iauPpsp p-vector plus scaled p-vector
31766 * iauPvu update a pv-vector
31767 * iauS2c spherical to p-vector
31768 * @version 2018 December 5
31769 * @since SOFA release 2019-07-22
31770 */
31771 public static SphericalCoordinate jauFk45z(double r1950, double d1950, double bepoch)
31772 {
31773 /* Radians per year to arcsec per century */
31774 final double PMF = 100.0*DR2AS;
31775
31776 /* Position and position+velocity vectors */
31777 double r0[], p[], pv[][] = new double[2][3];
31778
31779 /* Miscellaneous */
31780 double w;
31781 int i, j, k;
31782
31783 /*
31784 * CANONICAL CONSTANTS (Seidelmann 1992)
31785 */
31786
31787 /* Vectors A and Adot (Seidelmann 3.591-2) */
31788 final double a[] = new double[]{ -1.62557e-6, -0.31919e-6, -0.13843e-6 };
31789 final double ad[] = new double[]{ +1.245e-3, -1.580e-3, -0.659e-3 };
31790
31791 /* 3x2 matrix of p-vectors (cf. Seidelmann 3.591-4, matrix M) */
31792 final double em[][][] = new double[][][] {
31793 { { +0.9999256782, -0.0111820611, -0.0048579477 },
31794 { +0.0111820610, +0.9999374784, -0.0000271765 },
31795 { +0.0048579479, -0.0000271474, +0.9999881997 } },
31796 { { -0.000551, -0.238565, +0.435739 },
31797 { +0.238514, -0.002667, -0.008541 },
31798 { -0.435623, +0.012254, +0.002117 } }
31799 };
31800
31801 /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
31802
31803 /* Spherical coordinates to p-vector. */
31804 r0 = jauS2c(r1950, d1950);
31805
31806 /* Adjust p-vector A to give zero proper motion in FK5. */
31807 w = (bepoch - 1950) / PMF;
31808 p = jauPpsp(a, w, ad );
31809
31810 /* Remove E-terms. */
31811 p = jauPpsp(p, -jauPdp(r0,p), r0);
31812 p = jauPmp(r0, p);
31813
31814 /* Convert to Fricke system pv-vector (cf. Seidelmann 3.591-3). */
31815 for ( i = 0; i < 2; i++ ) {
31816 for ( j = 0; j < 3; j++ ) {
31817 w = 0.0;
31818 for ( k = 0; k < 3; k++ ) {
31819 w += em[i][j][k] * p[k];
31820 }
31821 pv[i][j] = w;
31822 }
31823 }
31824
31825 /* Allow for fictitious proper motion. */
31826 JulianDate jd = jauEpb2jd(bepoch);
31827 w = (jauEpj(jd.djm0,jd.djm1)-2000.0) / PMF;
31828 pv = jauPvu(w, pv);
31829
31830 /* Revert to spherical coordinates. */
31831 SphericalCoordinate sc = jauC2s(pv[0]);
31832 sc.alpha = jauAnp(sc.alpha);
31833 return sc;
31834
31835 }
31836
31837
31838 /**
31839 * Convert J2000.0 FK5 star catalog data to B1950.0 FK4.
31840 * <p>This function is derived from the International Astronomical Union's
31841 * SOFA (Standards of Fundamental Astronomy) software collection.
31842 * Status: support function.
31843 * <!--Given: (all J2000.0, FK5) -->
31844 * @param r2000 double J2000.0 RA (rad)
31845 * @param d2000 double J2000.0 Dec (rad)
31846 * @param dr2000 double J2000.0 proper motions (rad/Jul.yr)
31847 * @param dd2000 double J2000.0 proper motions (rad/Jul.yr)
31848 * @param p2000 double parallax (arcsec)
31849 * @param v2000 double radial velocity (km/s, +ve = moving away)
31850 *
31851 * @return (all B1950.0, FK4)
31852 * <p>Notes: <ol>
31853
31854 * <li> The proper motions in RA are dRA/dt rather than cos(Dec)*dRA/dt,
31855 * and are per year rather than per century.
31856 * <li> The conversion is somewhat complicated, for several reasons:
31857 * . Change of standard epoch from J2000.0 to B1950.0.
31858 * . An intermediate transition date of 1984 January 1.0 TT.
31859 * . A change of precession model.
31860 * . Change of time unit for proper motion (Julian to tropical).
31861 * . FK4 positions include the E-terms of aberration, to simplify
31862 * the hand computation of annual aberration. FK5 positions
31863 * assume a rigorous aberration computation based on the Earth's
31864 * barycentric velocity.
31865 * . The E-terms also affect proper motions, and in particular cause
31866 * objects at large distances to exhibit fictitious proper
31867 * motions.
31868 * The algorithm is based on Smith et al. (1989) and Yallop et al.
31869 * (1989), which presented a matrix method due to Standish (1982) as
31870 * developed by Aoki et al. (1983), using Kinoshita's development of
31871 * Andoyer's post-Newcomb precession. The numerical constants from
31872 * Seidelmann (1992) are used canonically.
31873 * <li> In the FK4 catalog the proper motions of stars within 10 degrees
31874 * of the poles do not embody differential E-terms effects and
31875 * should, strictly speaking, be handled in a different manner from
31876 * stars outside these regions. However, given the general lack of
31877 * homogeneity of the star data available for routine astrometry,
31878 * the difficulties of handling positions that may have been
31879 * determined from astrometric fields spanning the polar and non-
31880 * polar regions, the likelihood that the differential E-terms
31881 * effect was not taken into account when allowing for proper motion
31882 * in past astrometry, and the undesirability of a discontinuity in
31883 * the algorithm, the decision has been made in this SOFA algorithm
31884 * to include the effects of differential E-terms on the proper
31885 * motions for all stars, whether polar or not. At epoch J2000.0,
31886 * and measuring "on the sky" rather than in terms of RA change, the
31887 * errors resulting from this simplification are less than
31888 * 1 milliarcsecond in position and 1 milliarcsecond per century in
31889 * proper motion.
31890 * </ol>
31891 * Called:
31892 * iauAnp normalize angle into range 0 to 2pi
31893 * iauPdp scalar product of two p-vectors
31894 * iauPm modulus of p-vector
31895 * iauPmp p-vector minus p-vector
31896 * iauPpp p-vector pluus p-vector
31897 * iauPv2s pv-vector to spherical coordinates
31898 * iauS2pv spherical coordinates to pv-vector
31899 * iauSxp multiply p-vector by scalar
31900 * <p> References: <ul>
31901 * <li>Aoki, S. et al., 1983, "Conversion matrix of epoch B1950.0
31902 * FK4-based positions of stars to epoch J2000.0 positions in
31903 * accordance with the new IAU resolutions". Astron.Astrophys.
31904 * 128, 263-267.
31905 * <li>Seidelmann, P.K. (ed), 1992, "Explanatory Supplement to the
31906 * Astronomical Almanac", ISBN 0-935702-68-7.
31907 * <li>Smith, C.A. et al., 1989, "The transformation of astrometric
31908 * catalog systems to the equinox J2000.0". Astron.J. 97, 265.
31909 * <li>Standish, E.M., 1982, "Conversion of positions and proper motions
31910 * from B1950.0 to the IAU system at J2000.0". Astron.Astrophys.,
31911 * 115, 1, 20-22.
31912 * <li>Yallop, B.D. et al., 1989, "Transformation of mean star places
31913 * from FK4 B1950.0 to FK5 J2000.0 using matrices in 6-space".
31914 * Astron.J. 97, 274.
31915 * </ul>
31916 * @version 2018 December 5
31917 * @since SOFA release 2019-07-22
31918 */
31919 public static CatalogCoords jauFk524(double r2000, double d2000,
31920 double dr2000, double dd2000,
31921 double p2000, double v2000)
31922 {
31923 /* Radians per year to arcsec per century */
31924 final double PMF = 100.0*DR2AS;
31925
31926 /* Small number to avoid arithmetic problems */
31927 final double TINY = 1e-30;
31928
31929 /* Miscellaneous */
31930 double r, d, ur, ud, px, rv, pxvf, w;
31931 int i, j, k, l;
31932
31933 /* Vectors, p and pv */
31934 double r0[][], r1[][] = new double[2][3], p1[], p2[], pv[][] = new double[2][3];
31935
31936 /*
31937 * CANONICAL CONSTANTS (Seidelmann 1992)
31938 */
31939
31940 /* Km per sec to AU per tropical century */
31941 /* = 86400 * 36524.2198782 / 149597870.7 */
31942 final double VF = 21.095;
31943
31944 /* Constant pv-vector (cf. Seidelmann 3.591-2, vectors A and Adot) */
31945 final double a[][] = new double[][] {
31946 { -1.62557e-6, -0.31919e-6, -0.13843e-6 },
31947 { +1.245e-3, -1.580e-3, -0.659e-3 }
31948 };
31949
31950 /* 3x2 matrix of pv-vectors (cf. Seidelmann 3.592-1, matrix M^-1) */
31951 final double em[][][][] = new double[][][][] {
31952
31953 { { { +0.9999256795, +0.0111814828, +0.0048590039, },
31954 { -0.00000242389840, -0.00000002710544, -0.00000001177742 } },
31955
31956 { { -0.0111814828, +0.9999374849, -0.0000271771, },
31957 { +0.00000002710544, -0.00000242392702, +0.00000000006585 } },
31958
31959 { { -0.0048590040, -0.0000271557, +0.9999881946, },
31960 { +0.00000001177742, +0.00000000006585, -0.00000242404995 } } },
31961
31962 { { { -0.000551, +0.238509, -0.435614, },
31963 { +0.99990432, +0.01118145, +0.00485852 } },
31964
31965 { { -0.238560, -0.002667, +0.012254, },
31966 { -0.01118145, +0.99991613, -0.00002717 } },
31967
31968 { { +0.435730, -0.008541, +0.002117, },
31969 { -0.00485852, -0.00002716, +0.99996684 } } }
31970
31971 };
31972
31973 /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
31974
31975 /* The FK5 data (units radians and arcsec per Julian century). */
31976 r = r2000;
31977 d = d2000;
31978 ur = dr2000*PMF;
31979 ud = dd2000*PMF;
31980 px = p2000;
31981 rv = v2000;
31982
31983 /* Express as a pv-vector. */
31984 pxvf = px * VF;
31985 w = rv * pxvf;
31986 r0 = jauS2pv(r, d, 1.0, ur, ud, w);
31987
31988 /* Convert pv-vector to Bessel-Newcomb system (cf. Seidelmann 3.592-1). */
31989 for ( i = 0; i < 2; i++ ) {
31990 for ( j = 0; j < 3; j++ ) {
31991 w = 0.0;
31992 for ( k = 0; k < 2; k++ ) {
31993 for ( l = 0; l < 3; l++ ) {
31994 w += em[i][j][k][l] * r0[k][l];
31995 }
31996 }
31997 r1[i][j] = w;
31998 }
31999 }
32000
32001 /* Apply E-terms (equivalent to Seidelmann 3.592-3, one iteration). */
32002
32003 /* Direction. */
32004 w = jauPm(r1[0]);
32005 p1 =jauSxp(jauPdp(r1[0],a[0]), r1[0]);
32006 p2 = jauSxp(w, a[0]);
32007 p1 = jauPmp(p2, p1);
32008 p1 = jauPpp(r1[0], p1);
32009
32010 /* Recompute length. */
32011 w = jauPm(p1);
32012
32013 /* Direction. */
32014 p1 = jauSxp(jauPdp(r1[0],a[0]), r1[0]);
32015 p2 = jauSxp(w, a[0]);
32016 p1 = jauPmp(p2, p1);
32017 pv[0] = jauPpp(r1[0], p1);
32018
32019 /* Derivative. */
32020 p1 =jauSxp(jauPdp(r1[0],a[1]), pv[0]);
32021 p2 = jauSxp(w, a[1]);
32022 p1 = jauPmp(p2, p1);
32023 pv[1] = jauPpp(r1[1], p1);
32024
32025 /* Revert to catalog form. */
32026 SphericalPositionVelocity sv = jauPv2s(pv);//, &r, &d, &w, &ur, &ud, &rd);
32027 if ( px > TINY ) {
32028 rv = sv.vel.r/pxvf;
32029 px = px/sv.pos.r;
32030 }
32031
32032 /* Return the results. */
32033 return new CatalogCoords(jauAnp(sv.pos.theta), sv.pos.phi, sv.vel.theta/PMF, sv.vel.phi/PMF, px, rv);
32034 }
32035
32036 /**
32037 * Convert a J2000.0 FK5 star position to B1950.0 FK4, assuming zero
32038 * proper motion in FK5 and parallax.
32039 * <p>This function is derived from the International Astronomical Union's
32040 * SOFA (Standards of Fundamental Astronomy) software collection.
32041 * Status: support function.
32042 * @param r2000 double J2000.0 FK5 RA (rad)
32043 * @param d2000 double J2000.0 FK5 Dec (rad)
32044 * @param bepoch double Besselian epoch (e.g. 1950.0)
32045 * @return B1950.0 FK4 RA,Dec (rad) at epoch BEPOCH
32046 *
32047 * <p>Notes: <ol>
32048
32049 * <li> In contrast to the iauFk524 routine, here the FK5 proper
32050 * motions, the parallax and the radial velocity are presumed zero.
32051 * <li> This function converts a star position from the IAU 1976 FK5
32052 * (Fricke) system to the former FK4 (Bessel-Newcomb) system, for
32053 * cases such as distant radio sources where it is presumed there is
32054 * zero parallax and no proper motion. Because of the E-terms of
32055 * aberration, such objects have (in general) non-zero proper motion
32056 * in FK4, and the present routine returns those fictitious proper
32057 * motions.
32058 * <li> Conversion from B1950.0 FK4 to J2000.0 FK5 only is provided for.
32059 * Conversions involving other equinoxes would require additional
32060 * treatment for precession.
32061 * <li> The position returned by this routine is in the B1950.0 FK4
32062 * reference system but at Besselian epoch BEPOCH. For comparison
32063 * with catalogs the BEPOCH argument will frequently be 1950.0. (In
32064 * this context the distinction between Besselian and Julian epoch
32065 * is insignificant.)
32066 * <li> The RA component of the returned (fictitious) proper motion is
32067 * dRA/dt rather than cos(Dec)*dRA/dt.
32068 * </ol>
32069 * Called:
32070 * jauAnp normalize angle into range 0 to 2pi
32071 * jauC2s p-vector to spherical
32072 * jauFk524 FK4 to FK5
32073 * jauS2c spherical to p-vector
32074 * @version 2018 December 5
32075 * @since SOFA release 2019-07-22
32076 */
32077 public static CatalogCoords jauFk54z(double r2000, double d2000, double bepoch)
32078 {
32079 double p[], w, v[]= new double[3];
32080 int i;
32081
32082
32083 /* FK5 equinox J2000.0 to FK4 equinox B1950.0. */
32084 CatalogCoords cc = jauFk524(r2000, d2000, 0.0, 0.0, 0.0, 0.0);
32085
32086 /* Spherical to Cartesian. */
32087 p = jauS2c(cc.pos.alpha, cc.pos.delta );
32088
32089 /* Fictitious proper motion (radians per year). */
32090 v[0] = - cc.pm.alpha*p[1] - cc.pm.delta*cos(cc.pos.alpha)*sin(cc.pos.delta);
32091 v[1] = cc.pm.alpha*p[0] - cc.pm.delta*sin(cc.pos.alpha)*sin(cc.pos.delta);
32092 v[2] = cc.pm.delta*cos(cc.pos.delta);
32093
32094 /* Apply the motion. */
32095 w = bepoch - 1950.0;
32096 for ( i = 0; i < 3; i++ ) {
32097 p[i] += w*v[i];
32098 }
32099
32100 /* Cartesian to spherical. */
32101 SphericalCoordinate sp = jauC2s(p);
32102 cc.pos.alpha = jauAnp(sp.alpha);
32103 cc.pos.delta = sp.delta;
32104
32105 return cc;
32106
32107 }
32108 }
32109
32110 /*
32111 * Copyright © 2019 Paul Harrison, University of Manchester.
32112 *
32113 * This JSOFA software is derived from the official C release of the "Standards Of Fundamental Astronomy" (SOFA) library
32114 * of the International Astronomical Union. The intention is to reproduce the functionality and algorithms of
32115 * the official SOFA library in a pure Java form.
32116 *
32117 * The responsibility for the maintenance and supply of the JSOFA library lies with the author (not the IAU SOFA Board),
32118 * However, The JSOFA software is provided "as is" and the author makes no warranty as to its use or performance.
32119 * The author does not and cannot warrant the performance or results which the user may obtain by using the JSOFA software.
32120 * The author makes no warranties, express or implied, as to non-infringement of third party rights, merchantability,
32121 * or fitness for any particular purpose. In no event will the author be liable to the user for any consequential,
32122 * incidental, or special damages, including any lost profits or lost savings, even if the author has been advised
32123 * of such damages, or for any claim by any third party.
32124 *
32125 * Other conditions of the original license (reproduced below) are carried over as applicable.
32126 */
32127
32128 /*----------------------------------------------------------------------
32129 *
32130 * Copyright (C) 2019
32131 * Standards Of Fundamental Astronomy Board
32132 * of the International Astronomical Union.
32133 *
32134 * =====================
32135 * SOFA Software License
32136 * =====================
32137 *
32138 * NOTICE TO USER:
32139 *
32140 * BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING SIX TERMS AND
32141 * CONDITIONS WHICH APPLY TO ITS USE.
32142 *
32143 * 1. The Software is owned by the IAU SOFA Board ("SOFA").
32144 *
32145 * 2. Permission is granted to anyone to use the SOFA software for any
32146 * purpose, including commercial applications, free of charge and
32147 * without payment of royalties, subject to the conditions and
32148 * restrictions listed below.
32149 *
32150 * 3. You (the user) may copy and distribute SOFA source code to others,
32151 * and use and adapt its code and algorithms in your own software,
32152 * on a world-wide, royalty-free basis. That portion of your
32153 * distribution that does not consist of intact and unchanged copies
32154 * of SOFA source code files is a "derived work" that must comply
32155 * with the following requirements:
32156 *
32157 * a) Your work shall be marked or carry a statement that it
32158 * (i) uses routines and computations derived by you from
32159 * software provided by SOFA under license to you; and
32160 * (ii) does not itself constitute software provided by and/or
32161 * endorsed by SOFA.
32162 *
32163 * b) The source code of your derived work must contain descriptions
32164 * of how the derived work is based upon, contains and/or differs
32165 * from the original SOFA software.
32166 *
32167 * c) The names of all routines in your derived work shall not
32168 * include the prefix "iau" or "sofa" or trivial modifications
32169 * thereof such as changes of case.
32170 *
32171 * d) The origin of the SOFA components of your derived work must
32172 * not be misrepresented; you must not claim that you wrote the
32173 * original software, nor file a patent application for SOFA
32174 * software or algorithms embedded in the SOFA software.
32175 *
32176 * e) These requirements must be reproduced intact in any source
32177 * distribution and shall apply to anyone to whom you have
32178 * granted a further right to modify the source code of your
32179 * derived work.
32180 *
32181 * Note that, as originally distributed, the SOFA software is
32182 * intended to be a definitive implementation of the IAU standards,
32183 * and consequently third-party modifications are discouraged. All
32184 * variations, no matter how minor, must be explicitly marked as
32185 * such, as explained above.
32186 *
32187 * 4. You shall not cause the SOFA software to be brought into
32188 * disrepute, either by misuse, or use for inappropriate tasks, or
32189 * by inappropriate modification.
32190 *
32191 * 5. The SOFA software is provided "as is" and SOFA makes no warranty
32192 * as to its use or performance. SOFA does not and cannot warrant
32193 * the performance or results which the user may obtain by using the
32194 * SOFA software. SOFA makes no warranties, express or implied, as
32195 * to non-infringement of third party rights, merchantability, or
32196 * fitness for any particular purpose. In no event will SOFA be
32197 * liable to the user for any consequential, incidental, or special
32198 * damages, including any lost profits or lost savings, even if a
32199 * SOFA representative has been advised of such damages, or for any
32200 * claim by any third party.
32201 *
32202 * 6. The provision of any version of the SOFA software under the terms
32203 * and conditions specified herein does not imply that future
32204 * versions will also be made available under the same terms and
32205 * conditions.
32206 *
32207 * In any published work or commercial product which uses the SOFA
32208 * software directly, acknowledgement (see www.iausofa.org) is
32209 * appreciated.
32210 *
32211 * Correspondence concerning SOFA software should be addressed as
32212 * follows:
32213 *
32214 * By email: sofa@ukho.gov.uk
32215 * By post: IAU SOFA Center
32216 * HM Nautical Almanac Office
32217 * UK Hydrographic Office
32218 * Admiralty Way, Taunton
32219 * Somerset, TA1 2DN
32220 * United Kingdom
32221 *
32222 *--------------------------------------------------------------------*/
32223
32224
32225 /*
32226 * $Log$
32227 */